From 09cfa3abf13a999f902d3144b70c58fffd6c4dd1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 21 Feb 2026 00:18:46 +0000 Subject: [PATCH 1/2] feat: add `UserListService` for creating and managing user lists feat: add `UserListDirectLicenseService` for creating and managing direct user list licenses feat: add `UserListGlobalLicenseService` for creating and managing global user list licenses feat: add `MarketingDataInsightsService` for retrieving marketing data insights for a given user list feat: add `PartnerLinkService` for creating and managing links between advertiser and data partner accounts feat: add `UserList` resource feat: add `UserListDirectLicense` resource feat: add `UserListGlobalLicense` resource feat: add `UserListGlobalLicenseCustomerInfo` resource feat: add `PartnerLink` resource feat: add `UserIdData` to `AudienceMember` to support User ID in audience member ingestion feat: add `PpidData` to `AudienceMember` to support Publisher Provided ID (PPID) in audience member ingestion feat: add `IngestUserIdDataStatus` to `IngestAudienceMembersStatus` to report the status of user ID data ingestion feat: add `IngestPpidDataStatus` to `IngestAudienceMembersStatus` to report the status of PPID data ingestion feat: add `RemoveUserIdDataStatus` to `RemoveAudienceMembersStatus` to report the status of user ID data removal feat: add `RemovePpidDataStatus` to `RemoveAudienceMembersStatus` to report the status of PPID data removal feat: add `GOOGLE_AD_MANAGER_AUDIENCE_LINK` to the `AccountType` enum feat: add `AgeRange` and `Gender` enums to support demographic breakdown in marketing insights feat: add new `ErrorReason` values for licensing, user list operations, and permission checks fix!: changed `conversion_value` field to be optional in message `Event` docs: add comments to resources and methods to clarify which are available only to data partners docs: a comment for enum `ErrorReason` is changed to clarify that it is subject to future additions docs: a comment for field `pair_data` in message `AudienceMember` is changed to clarify it is only available to data partners docs: a comment for message `PairData` is changed to clarify it is only available to data partners PiperOrigin-RevId: 873059573 Source-Link: https://github.com/googleapis/googleapis/commit/1e6955c69d9cec0fbdae81137d4eeec480ca392f Source-Link: https://github.com/googleapis/googleapis-gen/commit/91b643ac9fbfd7e7942576c4a356a19d13335ba8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFkcy1kYXRhbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiOTFiNjQzYWM5ZmJmZDdlNzk0MjU3NmM0YTM1NmExOWQxMzMzNWJhOCJ9 --- .../google-ads-datamanager/.eslintignore | 7 + .../google-ads-datamanager/.eslintrc.json | 3 + .../google-ads-datamanager/.gitattributes | 4 + .../google-ads-datamanager/.gitignore | 14 + .../google-ads-datamanager/.jsdoc.js | 55 + .../google-ads-datamanager/.mocharc.js | 33 + owl-bot-staging/google-ads-datamanager/.nycrc | 24 + .../google-ads-datamanager/.prettierignore | 6 + .../google-ads-datamanager/.prettierrc.js | 22 + .../google-ads-datamanager/CODE_OF_CONDUCT.md | 94 + .../google-ads-datamanager/CONTRIBUTING.md | 76 + .../google-ads-datamanager/LICENSE | 202 + .../google-ads-datamanager/README.md | 135 + .../google/ads/datamanager/v1/age_range.proto | 52 + .../google/ads/datamanager/v1/audience.proto | 102 + .../google/ads/datamanager/v1/cart_data.proto | 72 + .../google/ads/datamanager/v1/consent.proto | 50 + .../ads/datamanager/v1/destination.proto | 130 + .../ads/datamanager/v1/device_info.proto | 46 + .../ads/datamanager/v1/encryption_info.proto | 100 + .../google/ads/datamanager/v1/error.proto | 339 + .../google/ads/datamanager/v1/event.proto | 189 + .../datamanager/v1/experimental_field.proto | 36 + .../google/ads/datamanager/v1/gender.proto | 40 + .../datamanager/v1/ingestion_service.proto | 239 + .../ads/datamanager/v1/insights_service.proto | 152 + .../ads/datamanager/v1/item_parameter.proto | 39 + .../ads/datamanager/v1/match_rate.proto | 62 + .../datamanager/v1/partner_link_service.proto | 224 + .../datamanager/v1/processing_errors.proto | 190 + .../v1/request_status_per_destination.proto | 264 + .../ads/datamanager/v1/terms_of_service.proto | 51 + .../google/ads/datamanager/v1/user_data.proto | 74 + .../google/ads/datamanager/v1/user_list.proto | 423 + .../v1/user_list_direct_license.proto | 91 + .../v1/user_list_direct_license_service.proto | 197 + .../v1/user_list_global_license.proto | 139 + .../v1/user_list_global_license_service.proto | 275 + .../v1/user_list_global_license_type.proto | 40 + ...ser_list_license_client_account_type.proto | 43 + .../v1/user_list_license_metrics.proto | 53 + .../v1/user_list_license_pricing.proto | 111 + .../v1/user_list_license_status.proto | 37 + .../datamanager/v1/user_list_service.proto | 272 + .../ads/datamanager/v1/user_properties.proto | 87 + .../google-ads-datamanager/protos/protos.d.ts | 18315 ++++++ .../google-ads-datamanager/protos/protos.js | 48872 ++++++++++++++++ .../google-ads-datamanager/protos/protos.json | 5456 ++ ...gestion_service.ingest_audience_members.js | 100 + .../v1/ingestion_service.ingest_events.js | 96 + ...gestion_service.remove_audience_members.js | 85 + ...gestion_service.retrieve_request_status.js | 61 + ...data_insights_service.retrieve_insights.js | 72 + ...artner_link_service.create_partner_link.js | 67 + ...artner_link_service.delete_partner_link.js | 63 + ...rtner_link_service.search_partner_links.js | 99 + ...et_metadata_google.ads.datamanager.v1.json | 1063 + ...service.create_user_list_direct_license.js | 67 + ...se_service.get_user_list_direct_license.js | 61 + ..._service.list_user_list_direct_licenses.js | 98 + ...service.update_user_list_direct_license.js | 67 + ...service.create_user_list_global_license.js | 67 + ...se_service.get_user_list_global_license.js | 61 + ...user_list_global_license_customer_infos.js | 102 + ..._service.list_user_list_global_licenses.js | 98 + ...service.update_user_list_global_license.js | 67 + .../v1/user_list_service.create_user_list.js | 71 + .../v1/user_list_service.delete_user_list.js | 67 + .../v1/user_list_service.get_user_list.js | 63 + .../v1/user_list_service.list_user_lists.js | 101 + .../v1/user_list_service.update_user_list.js | 72 + .../google-ads-datamanager/src/index.ts | 37 + .../src/v1/gapic_metadata.json | 333 + .../google-ads-datamanager/src/v1/index.ts | 24 + .../src/v1/ingestion_service_client.ts | 1048 + .../v1/ingestion_service_client_config.json | 42 + .../src/v1/ingestion_service_proto_list.json | 34 + .../marketing_data_insights_service_client.ts | 737 + ...g_data_insights_service_client_config.json | 30 + ...ting_data_insights_service_proto_list.json | 34 + .../src/v1/partner_link_service_client.ts | 1191 + .../partner_link_service_client_config.json | 38 + .../v1/partner_link_service_proto_list.json | 34 + ...user_list_direct_license_service_client.ts | 1251 + ..._direct_license_service_client_config.json | 42 + ...ist_direct_license_service_proto_list.json | 34 + ...user_list_global_license_service_client.ts | 1548 + ..._global_license_service_client_config.json | 46 + ...ist_global_license_service_proto_list.json | 34 + .../src/v1/user_list_service_client.ts | 1419 + .../v1/user_list_service_client_config.json | 46 + .../src/v1/user_list_service_proto_list.json | 34 + .../system-test/fixtures/sample/src/index.js | 32 + .../system-test/fixtures/sample/src/index.ts | 62 + .../system-test/install.ts | 49 + .../test/gapic_ingestion_service_v1.ts | 755 + ...apic_marketing_data_insights_service_v1.ts | 563 + .../test/gapic_partner_link_service_v1.ts | 1001 + ...pic_user_list_direct_license_service_v1.ts | 1113 + ...pic_user_list_global_license_service_v1.ts | 1358 + .../test/gapic_user_list_service_v1.ts | 1221 + .../google-ads-datamanager/tsconfig.json | 22 + .../google-ads-datamanager/webpack.config.js | 64 + 103 files changed, 94581 insertions(+) create mode 100644 owl-bot-staging/google-ads-datamanager/.eslintignore create mode 100644 owl-bot-staging/google-ads-datamanager/.eslintrc.json create mode 100644 owl-bot-staging/google-ads-datamanager/.gitattributes create mode 100644 owl-bot-staging/google-ads-datamanager/.gitignore create mode 100644 owl-bot-staging/google-ads-datamanager/.jsdoc.js create mode 100644 owl-bot-staging/google-ads-datamanager/.mocharc.js create mode 100644 owl-bot-staging/google-ads-datamanager/.nycrc create mode 100644 owl-bot-staging/google-ads-datamanager/.prettierignore create mode 100644 owl-bot-staging/google-ads-datamanager/.prettierrc.js create mode 100644 owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-ads-datamanager/LICENSE create mode 100644 owl-bot-staging/google-ads-datamanager/README.md create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto create mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.d.ts create mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.js create mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.json create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js create mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js create mode 100644 owl-bot-staging/google-ads-datamanager/src/index.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/index.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json create mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json create mode 100644 owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-ads-datamanager/system-test/install.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts create mode 100644 owl-bot-staging/google-ads-datamanager/tsconfig.json create mode 100644 owl-bot-staging/google-ads-datamanager/webpack.config.js diff --git a/owl-bot-staging/google-ads-datamanager/.eslintignore b/owl-bot-staging/google-ads-datamanager/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-ads-datamanager/.eslintrc.json b/owl-bot-staging/google-ads-datamanager/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-ads-datamanager/.gitattributes b/owl-bot-staging/google-ads-datamanager/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/.gitignore b/owl-bot-staging/google-ads-datamanager/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/.jsdoc.js b/owl-bot-staging/google-ads-datamanager/.jsdoc.js new file mode 100644 index 00000000000..67b7a465bac --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-ads/datamanager', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-ads-datamanager/.mocharc.js b/owl-bot-staging/google-ads-datamanager/.mocharc.js new file mode 100644 index 00000000000..5eb34e86c87 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/.nycrc b/owl-bot-staging/google-ads-datamanager/.nycrc new file mode 100644 index 00000000000..81a95fc94b0 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/.prettierignore b/owl-bot-staging/google-ads-datamanager/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-ads-datamanager/.prettierrc.js b/owl-bot-staging/google-ads-datamanager/.prettierrc.js new file mode 100644 index 00000000000..7649ee3c254 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md b/owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md b/owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md new file mode 100644 index 00000000000..07abc83b301 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/LICENSE b/owl-bot-staging/google-ads-datamanager/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/README.md b/owl-bot-staging/google-ads-datamanager/README.md new file mode 100644 index 00000000000..a1888aea2a6 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/README.md @@ -0,0 +1,135 @@ +[//]: # "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) | +| retrieve insights | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js) | +| create partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js) | +| delete partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js) | +| search partner links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.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) | +| create user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js) | +| get user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js) | +| list user list direct licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js) | +| update user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js) | +| create user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js) | +| get user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js) | +| list user list global license customer infos | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js) | +| list user list global licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js) | +| update user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js) | +| create user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js) | +| delete user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js) | +| get user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js) | +| list user lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js) | +| update user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js) | + + +## 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto new file mode 100644 index 00000000000..d0472fcfc8d --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto @@ -0,0 +1,52 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "AgeRangeProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The demographic age ranges +enum AgeRange { + // Not specified. + AGE_RANGE_UNSPECIFIED = 0; + + // Unknown. + AGE_RANGE_UNKNOWN = 1; + + // Between 18 and 24 years old. + AGE_RANGE_18_24 = 2; + + // Between 25 and 34 years old. + AGE_RANGE_25_34 = 3; + + // Between 35 and 44 years old. + AGE_RANGE_35_44 = 4; + + // Between 45 and 54 years old. + AGE_RANGE_45_54 = 5; + + // Between 55 and 64 years old. + AGE_RANGE_55_64 = 6; + + // 65 years old and beyond. + AGE_RANGE_65_UP = 7; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto new file mode 100644 index 00000000000..a4a0d368b32 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto @@ -0,0 +1,102 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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). + // + // This feature is only available to data partners. + PairData pair_data = 4; + + // Data identifying the user's mobile devices. + MobileData mobile_data = 5; + + // Data related to unique identifiers for a user, as defined by the + // advertiser. + UserIdData user_id_data = 6; + + // Data related to publisher provided identifiers. + // + // This feature is only available to data partners. + PpidData ppid_data = 7; + } + + // 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. +// +// This feature is only available to data partners. +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]; +} + +// User id data holding the user id. +message UserIdData { + // Required. A unique identifier for a user, as defined by the + // advertiser. + string user_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Publisher provided identifiers data holding the ppids. At least one ppid is +// required. +// +// This feature is only available to data partners. +message PpidData { + // Required. The list of publisher provided identifiers for a user. + repeated string ppids = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto new file mode 100644 index 00000000000..5ddd8d9ba6f --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/item_parameter.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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]; + + // Optional. A unique identifier to reference the item. + string item_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A bucket of any [event parameters related to an + // item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) + // to be included within the event that were not already specified using other + // structured fields. + repeated ItemParameter additional_item_parameters = 5 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto new file mode 100644 index 00000000000..4fec4a414c5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto @@ -0,0 +1,50 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto new file mode 100644 index 00000000000..40d204e187c --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto @@ -0,0 +1,130 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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"; +option (google.api.resource_definition) = { + type: "datamanager.googleapis.com/Account" + pattern: "accountTypes/{account_type}/accounts/{account}" +}; + +// 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; + + // Google Analytics. + GOOGLE_ANALYTICS_PROPERTY = 5; + + // Google Ad Manager audience link. + GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6; + } + + // 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto new file mode 100644 index 00000000000..702c6022c03 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto @@ -0,0 +1,46 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto new file mode 100644 index 00000000000..365e5cd12e0 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto @@ -0,0 +1,100 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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; + + // Amazon Web Services wrapped key information. + AwsWrappedKeyInfo aws_wrapped_key_info = 2; + } +} + +// 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}` + // or + // `gcp-kms://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]; +} + +// A data encryption key wrapped by an AWS KMS key. +message AwsWrappedKeyInfo { + // 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 Amazon Resource Name of the IAM Role to assume for KMS + // decryption access. Should be in the format of + // `arn:{partition}:iam::{account_id}:role/{role_name}` + string role_arn = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The URI of the AWS KMS key used to decrypt the DEK. Should be in + // the format of `arn:{partition}:kms:{region}:{account_id}:key/{key_id}` or + // `aws-kms://arn:{partition}:kms:{region}:{account_id}:key/{key_id}` + 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto new file mode 100644 index 00000000000..8abaf0ad934 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto @@ -0,0 +1,339 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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. +// NOTE: This enum is not frozen and new values may be added in the future. +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; + + // Unsupported operating account for data partner authorization. + UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER = 37; + + // Unsupported linked account for data partner authorization. + UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER = 38; + + // Events data contains no user identifiers or ad identifiers. + NO_IDENTIFIERS_PROVIDED = 39; + + // The property type is not supported. + INVALID_PROPERTY_TYPE = 40; + + // The stream type is not supported. + INVALID_STREAM_TYPE = 41; + + // Linked account is only supported when the login account is a `DATA_PARTNER` + // account. + LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT = 42; + + // The login account must be the same as the operating account for the given + // use case. + OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH = 43; + + // Event did not occur within the acceptable time window. + EVENT_TIME_INVALID = 44; + + // Parameter uses a reserved name. + RESERVED_NAME_USED = 45; + + // The event name is not supported. + INVALID_EVENT_NAME = 46; + + // The account is not allowlisted for the given feature. + NOT_ALLOWLISTED = 47; + + // 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; + + // An event had 2 or more Google Analytics destinations. + MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT = 49; + + // The field value is too long. + FIELD_VALUE_TOO_LONG = 50; + + // Too many elements in a list in the request. + TOO_MANY_ELEMENTS = 51; + + // The resource already exists. + ALREADY_EXISTS = 52; + + // Attempted to set an immutable field for an update request. + IMMUTABLE_FIELD_FOR_UPDATE = 53; + + // The resource name is invalid. + INVALID_RESOURCE_NAME = 54; + + // The query filter is invalid. + INVALID_FILTER = 55; + + // The update mask is invalid. + INVALID_UPDATE_MASK = 56; + + // The page token is invalid. + INVALID_PAGE_TOKEN = 57; + + // Cannot update a license that has been disabled. + CANNOT_UPDATE_DISABLED_LICENSE = 58; + + // Sensitive user lists cannot be licensed to this client. + CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59; + + // Cost too low for this license. + INSUFFICIENT_COST = 60; + + // Reseller license cannot be disabled since it is in use. + CANNOT_DISABLE_LICENSE = 61; + + // Invalid client account id. + INVALID_CLIENT_ACCOUNT_ID = 62; + + // Non-zero cost not allowed for this client account. + PRICING_ONLY_ZERO_COST_ALLOWED = 63; + + // Cost too high for this license. + PRICE_TOO_HIGH = 64; + + // Customer not allowed to create license. + CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65; + + // Pricing end date is invalid for this license. + INVALID_PRICING_END_DATE = 66; + + // Logical user list with shared or licensed segment cannot be licensed. + CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67; + + // Client customer's account type in the request does not match the customer's + // actual account type. + MISMATCHED_ACCOUNT_TYPE = 68; + + // License type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69; + + // Client customer type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70; + + // Invalid media share cost. + INVALID_MEDIA_SHARE_COST = 71; + + // Invalid cost type. + INVALID_COST_TYPE = 72; + + // UserList type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73; + + // Max cost is only allowed for cost_type MEDIA_SHARE. + MAX_COST_NOT_ALLOWED = 74; + + // Commerce audience can only be directly licensed. + COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75; + + // The description is not valid. + INVALID_DESCRIPTION = 76; + + // The display name is not valid. + INVALID_DISPLAY_NAME = 77; + + // The display name is already being used for another user list for the + // account. + DISPLAY_NAME_ALREADY_USED = 78; + + // Ownership is required to modify the user list. + OWNERSHIP_REQUIRED_FOR_UPDATE = 79; + + // The user list type is read-only and does not support mutation. + USER_LIST_MUTATION_NOT_SUPPORTED = 80; + + // A user list which is privacy sensitive or legal rejected cannot be mutated + // by external users. + SENSITIVE_USER_LIST_IMMUTABLE = 81; + + // The remarketing user list's billable record field cannot be modified once + // it is set. + BILLABLE_RECORD_COUNT_IMMUTABLE = 82; + + // The user list name is reserved for system lists. + USER_LIST_NAME_RESERVED = 83; + + // The advertiser needs to be allowlisted to use remarketing lists created + // from advertiser uploaded data. + ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84; + + // The partner audience source is not supported for the user list type. + UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85; + + // Setting the `commerce_partner` field is only supported if the + // `partner_audience_source` is `COMMERCE_AUDIENCE`. + COMMERCE_PARTNER_NOT_ALLOWED = 86; + + // The `partner_audience_info` field is not supported for the user list type. + UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87; + + // Partner Match user lists cannot be created by manager accounts. + PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88; + + // The data partner is not allowlisted for THIRD_PARTY_PARTNER_DATA. + DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89; + + // The advertiser has not accepted the partner's terms of service. + ADVERTISER_TOS_NOT_ACCEPTED = 90; + + // The advertiser is not allowlisted for THIRD_PARTY_PARTNER_DATA. + ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91; + + // This user list type is not supported for this account. + USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92; + + // The `commerce_partner` field is invalid. + INVALID_COMMERCE_PARTNER = 93; + + // The data provider is not allowlisted to create commerce audiences. + CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94; + + // The user list upload key types are not supported. + UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95; + + // The ingested user list info config is not supported. + UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96; + + // The account types are not supported for the user list type. + UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97; + + // The account types are not supported for the partner link. + UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto new file mode 100644 index 00000000000..0bd6ddd9c3a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto @@ -0,0 +1,189 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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. + optional 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]; + + // Optional. The name of the event. Required for GA4 events. + string event_name = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A unique identifier for the user instance of a web client for + // this GA4 web stream. + string client_id = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A unique identifier for a user, as defined by the advertiser. + string user_id = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A bucket of any [event + // parameters](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) + // to be included within the event that were not already specified using other + // structured fields. + repeated EventParameter additional_event_parameters = 19 + [(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]; +} + +// Event parameter for GA4 events. +message EventParameter { + // Required. The name of the parameter to use. + string parameter_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string representation of the value of the parameter to set. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto new file mode 100644 index 00000000000..da9eb106398 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto @@ -0,0 +1,36 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto new file mode 100644 index 00000000000..c4f1f70a2a3 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto @@ -0,0 +1,40 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "GenderProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// The type of demographic genders (for example, female). +enum Gender { + // Not specified. + GENDER_UNSPECIFIED = 0; + + // Unknown. + GENDER_UNKNOWN = 1; + + // Male. + GENDER_MALE = 2; + + // Female. + GENDER_FEMALE = 3; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto new file mode 100644 index 00000000000..d388f7691b9 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto @@ -0,0 +1,239 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto new file mode 100644 index 00000000000..514df3aac4a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto @@ -0,0 +1,152 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/age_range.proto"; +import "google/ads/datamanager/v1/gender.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "InsightsServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service to return insights on marketing data. +// +// This feature is only available to data partners. +service MarketingDataInsightsService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Retrieves marketing data insights for a given user list. + // + // This feature is only available to data partners. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc RetrieveInsights(RetrieveInsightsRequest) + returns (RetrieveInsightsResponse) { + option (google.api.http) = { + post: "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve" + body: "*" + }; + } +} + +// Request message for DM API MarketingDataInsightsService.RetrieveInsights +message RetrieveInsightsRequest { + // Required. The parent account that owns the user list. + // Format: `accountTypes/{account_type}/accounts/{account}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Baseline for the insights requested. + Baseline baseline = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user list ID for which insights are requested. + string user_list_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Baseline criteria against which insights are compared. +message Baseline { + // The baseline location of the request. Baseline location is on OR-list of + // ISO 3166-1 alpha-2 region codes of the requested regions. + message Location { + // List of ISO 3166-1 alpha-2 region codes. + repeated string region_codes = 1; + } + + // Baseline location against which insights are compared. + oneof baseline { + // The baseline location of the request. Baseline location is an OR-list + // of the requested regions. + Location baseline_location = 1; + + // If set to true, the service will try to automatically detect the + // baseline location for insights. + bool location_auto_detection_enabled = 2; + } +} + +// Response message for DM API MarketingDataInsightsService.RetrieveInsights +message RetrieveInsightsResponse { + // Insights for marketing data. + // + // This feature is only available to data partners. + message MarketingDataInsight { + // Possible dimensions for use in generating insights. + enum AudienceInsightsDimension { + // Not specified. + AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED = 0; + + // The value is unknown in this version. + AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN = 1; + + // An Affinity UserInterest. + AFFINITY_USER_INTEREST = 2; + + // An In-Market UserInterest. + IN_MARKET_USER_INTEREST = 3; + + // An age range. + AGE_RANGE = 4; + + // A gender. + GENDER = 5; + } + + // Insights for a collection of related attributes of the same dimension. + message MarketingDataInsightsAttribute { + // The user interest ID. + optional int64 user_interest_id = 1; + + // Measure of lift that the audience has for the attribute value as + // compared to the baseline. Range [0-1]. + optional float lift = 2; + + // Age range of the audience for which the lift is provided. + optional AgeRange age_range = 3; + + // Gender of the audience for which the lift is provided. + optional Gender gender = 4; + } + + // The dimension to which the insight belongs. + AudienceInsightsDimension dimension = 1; + + // Insights for values of a given dimension. + repeated MarketingDataInsightsAttribute attributes = 2; + } + + // Contains the insights for the marketing data. + repeated MarketingDataInsight marketing_data_insights = 1; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto new file mode 100644 index 00000000000..59ae9e3e233 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto @@ -0,0 +1,39 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "ItemParameterProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A bucket of any [event parameters related to an +// item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) +// to be included within the event that were not already specified using other +// structured fields. +message ItemParameter { + // Required. The name of the parameter to use. + string parameter_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string representation of the value of the parameter to set. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto new file mode 100644 index 00000000000..1fdfc7ed9ef --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto new file mode 100644 index 00000000000..79a591b776c --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto @@ -0,0 +1,224 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "PartnerLinkServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service for managing partner links. +service PartnerLinkService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Creates a partner link for the given account. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc CreatePartnerLink(CreatePartnerLinkRequest) returns (PartnerLink) { + option (google.api.http) = { + post: "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks" + body: "partner_link" + }; + option (google.api.method_signature) = "parent,partner_link"; + } + + // Deletes a partner link for the given account. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc DeletePartnerLink(DeletePartnerLinkRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Searches for all partner links to and from a given account. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc SearchPartnerLinks(SearchPartnerLinksRequest) + returns (SearchPartnerLinksResponse) { + option (google.api.http) = { + get: "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request to create a [PartnerLink][google.ads.datamanager.v1.PartnerLink] +// resource. Returns a +// [PartnerLink][google.ads.datamanager.v1.PartnerLink]. +message CreatePartnerLinkRequest { + // Required. The parent, which owns this collection of partner links. + // Format: accountTypes/{account_type}/accounts/{account} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/PartnerLink" + } + ]; + + // Required. The partner link to create. + PartnerLink partner_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a [PartnerLink][google.ads.datamanager.v1.PartnerLink] +// resource. Returns a [google.protobuf.Empty][google.protobuf.Empty]. +message DeletePartnerLinkRequest { + // Required. The resource name of the partner link to delete. + // Format: + // accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamanager.googleapis.com/PartnerLink" + } + ]; +} + +// Request to search for [PartnerLink][google.ads.datamanager.v1.PartnerLink] +// resources. Returns a +// [SearchPartnerLinksResponse][google.ads.datamanager.v1.SearchPartnerLinksResponse]. +message SearchPartnerLinksRequest { + // Required. Account to search for partner links. If no `filter` is specified, + // all partner links where this account is either the `owning_account` or + // `partner_account` are returned. + // + // Format: `accountTypes/{account_type}/accounts/{account}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/PartnerLink" + } + ]; + + // The maximum number of partner links to return. The service may return + // fewer than this value. + // If unspecified, at most 10 partner links will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. + int32 page_size = 2; + + // A page token, received from a previous `SearchPartnerLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `SearchPartnerLinks` + // must match the call that provided the page token. + string page_token = 3; + + // Optional. A [filter string](//google.aip.dev/160). All fields need to be on + // the left hand side of each condition (for example: `partner_link_id = + // 123456789`). + // + // Supported operations: + // + // - `AND` + // - `=` + // - `!=` + // + // Supported fields: + // + // - `partner_link_id` + // - `owning_account.account_type` + // - `owning_account.account_id` + // - `partner_account.account_type` + // - `partner_account.account_id` + // + // Example: + // `owning_account.account_type = "GOOGLE_ADS" OR partner_account.account_id = + // 987654321` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [SearchPartnerLinksRequest][google.ads.datamanager.v1.SearchPartnerLinksRequest]. +message SearchPartnerLinksResponse { + // The partner links for the given account. + repeated PartnerLink partner_links = 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; +} + +// A partner link between an owning account and a partner account. +message PartnerLink { + option (google.api.resource) = { + type: "datamanager.googleapis.com/PartnerLink" + pattern: "accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}" + plural: "partnerLinks" + singular: "partnerLink" + }; + + // Identifier. The name of the partner link. + // Format: + // accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The partner link ID. + string partner_link_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The owning account granting access to the partner account. + ProductAccount owning_account = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The partner account granted access by the owning account. + ProductAccount partner_account = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto new file mode 100644 index 00000000000..c2d77837de5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto @@ -0,0 +1,190 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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; + + // The system failed to authenticate with AWS. + PROCESSING_ERROR_REASON_AWS_AUTH_FAILED = 27; + + // 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; + + // The system failed to authenticate with AWS. + PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto new file mode 100644 index 00000000000..64ca0cbe033 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto @@ -0,0 +1,264 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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 user id data ingestion to the destination. + IngestUserIdDataStatus user_id_data_ingestion_status = 4; + + // The status of the ppid data ingestion to the destination. + IngestPpidDataStatus ppid_data_ingestion_status = 5; + } + } + + // 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 user id data removal from the destination. + RemoveUserIdDataStatus user_id_data_removal_status = 4; + + // The status of the ppid data removal from the destination. + RemovePpidDataStatus ppid_data_removal_status = 5; + } + } + + // 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; + } + + // The status of the user id data ingestion to the destination containing + // stats related to the ingestion. + message IngestUserIdDataStatus { + // 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 ids sent in the upload request for the + // destination. Includes all user ids in the request, regardless of + // whether they were successfully ingested or not. + int64 user_id_count = 2; + } + + // The status of the user id data removal from the destination. + message RemoveUserIdDataStatus { + // 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 ids sent in the removal request. Includes all + // user ids in the request, regardless of whether they were successfully + // removed or not. + int64 user_id_count = 2; + } + + // The status of the ppid data ingestion to the destination containing stats + // related to the ingestion. + message IngestPpidDataStatus { + // 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 ppids sent in the upload request for the + // destination. Includes all ppids in the request, regardless of + // whether they were successfully ingested or not. + int64 ppid_count = 2; + } + + // The status of the ppid data removal from the destination. + message RemovePpidDataStatus { + // 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 ppids sent in the removal request. Includes all + // ppids in the request, regardless of whether they were successfully + // removed or not. + int64 ppid_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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto new file mode 100644 index 00000000000..c4231dfa5aa --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto @@ -0,0 +1,51 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto new file mode 100644 index 00000000000..887c02b30e9 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto new file mode 100644 index 00000000000..0f15917653e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto @@ -0,0 +1,423 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A user list resource. +message UserList { + option (google.api.resource) = { + type: "datamanager.googleapis.com/UserList" + pattern: "accountTypes/{account_type}/accounts/{account}/userLists/{user_list}" + plural: "userLists" + singular: "userList" + }; + + // Status of the user list. + enum MembershipStatus { + // Not specified. + MEMBERSHIP_STATUS_UNSPECIFIED = 0; + + // Open status - User list is accruing members and can be targeted to. + OPEN = 1; + + // Closed status - No new members being added. + CLOSED = 2; + } + + // Indicates the reason why the user list was closed. + // This enum is only used when a list is auto-closed by the system. + enum ClosingReason { + // Not specified. + CLOSING_REASON_UNSPECIFIED = 0; + + // The user list was closed because it has not been used in targeting + // recently. See https://support.google.com/google-ads/answer/2472738 + // for details. + UNUSED = 1; + } + + // Enum describing possible access reasons. + enum AccessReason { + // Not specified. + ACCESS_REASON_UNSPECIFIED = 0; + + // The resource is owned by the user. + OWNED = 1; + + // The resource is shared to the user. + SHARED = 2; + + // The resource is licensed to the user. + LICENSED = 3; + + // The user subscribed to the resource. + SUBSCRIBED = 4; + + // The resource is accessible to the user. + AFFILIATED = 5; + } + + // Indicates if this client still has access to the list. + enum AccessStatus { + // Not specified. + ACCESS_STATUS_UNSPECIFIED = 0; + + // The access is enabled. + ENABLED = 1; + + // The access is disabled. + DISABLED = 2; + } + + // Identifier. The resource name of the user list. + // Format: + // accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The unique ID of the user list. + int64 id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An option that indicates if a user may edit a list. + bool read_only = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the user list. + optional string display_name = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A description of the user list. + optional string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Membership status of this user list. + optional MembershipStatus membership_status = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An ID from external system. It is used by user list sellers to + // correlate IDs on their systems. + optional string integration_code = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The duration a user remains in the user list. + // Valid durations are exact multiples of 24 hours (86400 seconds). + // Providing a value that is not an exact multiple of 24 hours will result in + // an INVALID_ARGUMENT error. + google.protobuf.Duration membership_duration = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The reason why this user list membership status is closed. + optional ClosingReason closing_reason = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason this account has been granted access to the list. + AccessReason access_reason = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Indicates if this share is still enabled. When a user list is + // shared with the account this field is set to `ENABLED`. Later the user list + // owner can decide to revoke the share and make it `DISABLED`. + optional AccessStatus account_access_status = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Estimated number of members in this user list in different + // target networks. + SizeInfo size_info = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Eligibility information for different target networks. + TargetNetworkInfo target_network_info = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Additional information about the user list. + oneof user_list_info { + // Optional. Represents a user list that is populated by user ingested data. + IngestedUserListInfo ingested_user_list_info = 14 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Estimated number of members in this user list in different target networks. +message SizeInfo { + // Output only. Estimated number of members in this user list, on the Google + // Display Network. + int64 display_network_members_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimated number of members in this user list in the + // google.com domain. These are the members available for targeting in Search + // campaigns. + int64 search_network_members_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Eligibility information for different target networks. +message TargetNetworkInfo { + // Output only. Indicates this user list is eligible for Google Display + // Network. + bool eligible_for_display = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Indicates if this user list is eligible for Google Search + // Network. + optional bool eligible_for_search = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a user list that is populated by user provided data. +message IngestedUserListInfo { + // Enum containing the possible upload key types of a user list. + enum UploadKeyType { + // Not specified. + UPLOAD_KEY_TYPE_UNSPECIFIED = 0; + + // Customer info such as email address, phone number or physical address. + CONTACT_ID = 1; + + // Mobile advertising ids. + MOBILE_ID = 2; + + // Third party provided user ids. + USER_ID = 3; + + // Publisher advertiser identity reconciliation ids. + PAIR_ID = 4; + + // Data Management Platform IDs: + // - Google User ID + // - Partner Provided ID + // - Publisher Provided ID + // - iOS IDFA + // - Android advertising ID + // - Roku ID + // - Amazon Fire TV ID + // - Xbox or Microsoft ID + PSEUDONYMOUS_ID = 5; + } + + // Required. Immutable. Upload key types of this user list. + repeated UploadKeyType upload_key_types = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Additional information when `CONTACT_ID` is one of the + // `upload_key_types`. + ContactIdInfo contact_id_info = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information when `MOBILE_ID` is one of the + // `upload_key_types`. + MobileIdInfo mobile_id_info = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information when `USER_ID` is one of the + // `upload_key_types`. + UserIdInfo user_id_info = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information when `PAIR_ID` is one of the + // `upload_key_types`. + // + // This feature is only available to data partners. + PairIdInfo pair_id_info = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information for `PSEUDONYMOUS_ID` is one of the + // `upload_key_types`. + PseudonymousIdInfo pseudonymous_id_info = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information for partner audiences. + // + // This feature is only available to data partners. + PartnerAudienceInfo partner_audience_info = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional information when `CONTACT_ID` is one of the `upload_key_types`. +message ContactIdInfo { + // Optional. Immutable. Source of the upload data + optional DataSourceType data_source_type = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. Match rate for customer match user lists. + int32 match_rate_percentage = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Additional information when `MOBILE_ID` is one of the `upload_key_types`. +message MobileIdInfo { + // Key space for mobile ID. + enum KeySpace { + // Not specified. + KEY_SPACE_UNSPECIFIED = 0; + + // The iOS keyspace. + IOS = 1; + + // The Android keyspace. + ANDROID = 2; + } + + // Optional. Immutable. Source of the upload data. + optional DataSourceType data_source_type = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The key space of mobile IDs. + optional KeySpace key_space = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. A string that uniquely identifies a mobile application + // from which the data was collected. + optional string app_id = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Additional information when `USER_ID` is one of the `upload_key_types`. +message UserIdInfo { + // Optional. Immutable. Source of the upload data. + optional DataSourceType data_source_type = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Additional information when `PAIR_ID` is one of the `upload_key_types`. +// +// This feature is only available to data partners. +message PairIdInfo { + // Required. Immutable. Identifies the publisher that the Publisher Advertiser + // Identity Reconciliation user list is reconciled with. This field is + // provided by the cleanroom provider and is only unique in the scope of that + // cleanroom. This cannot be used as a global identifier across multiple + // cleanrooms. + optional int64 publisher_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Descriptive name of the publisher to be displayed in the UI for a + // better targeting experience. + optional string publisher_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. This field denotes the percentage of membership match of this + // user list with the corresponding publisher's first party data. Must be + // between 0 and 100 inclusive. + int32 match_rate_percentage = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The count of the advertiser's first party data records that + // have been uploaded to a clean room provider. This does not signify the size + // of a PAIR user list. + int64 advertiser_identifier_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Identifies a unique advertiser to publisher + // relationship with one clean room provider or across multiple clean room + // providers. + optional string clean_room_identifier = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Additional information for partner audiences. +// +// This feature is only available to data partners. +message PartnerAudienceInfo { + // Partner audience source. + enum PartnerAudienceSource { + // Not specified. + PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0; + + // Partner Audience source is commerce audience. + COMMERCE_AUDIENCE = 1; + + // Partner Audience source is linear TV audience. + LINEAR_TV_AUDIENCE = 2; + + // Partner Audience source is agency/provider audience. + AGENCY_PROVIDER_AUDIENCE = 3; + } + + // Required. Immutable. The source of the partner audience. + optional PartnerAudienceSource partner_audience_source = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The commerce partner name. + // Only allowed if `partner_audience_source` is `COMMERCE_AUDIENCE`. + optional string commerce_partner = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional information when `PSEUDONYMOUS_ID` is one of the +// `upload_key_types`. +message PseudonymousIdInfo { + // Sync status of the user list. + enum SyncStatus { + // Not specified. + SYNC_STATUS_UNSPECIFIED = 0; + + // The user list has been created as a placeholder. List contents and/or + // metadata are still being synced. The user list is not ready for use. + CREATED = 1; + + // The user list is ready for use. Contents and cookies have been synced + // correctly. + READY_FOR_USE = 2; + + // An error has occurred syncing user list contents and/or metadata. The + // user list cannot be used. + FAILED = 3; + } + + // Output only. Sync status of the user list. + optional SyncStatus sync_status = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Immutable. The number of billable records (e.g. uploaded or + // matched). + optional int64 billable_record_count = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Indicates source of upload data. +enum DataSourceType { + // Not specified. + DATA_SOURCE_TYPE_UNSPECIFIED = 0; + + // The uploaded data is first-party data. + DATA_SOURCE_TYPE_FIRST_PARTY = 1; + + // The uploaded data is from a third-party credit bureau. + DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU = 2; + + // The uploaded data is from a third-party voter file. + DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE = 3; + + // The uploaded data is third party partner data. + DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA = 4; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto new file mode 100644 index 00000000000..44962539c41 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_license_client_account_type.proto"; +import "google/ads/datamanager/v1/user_list_license_metrics.proto"; +import "google/ads/datamanager/v1/user_list_license_pricing.proto"; +import "google/ads/datamanager/v1/user_list_license_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListDirectLicenseProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A user list direct license. +// +// This feature is only available to data partners. +message UserListDirectLicense { + option (google.api.resource) = { + type: "datamanager.googleapis.com/UserListDirectLicense" + pattern: "accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}" + plural: "userListDirectLicenses" + singular: "userListDirectLicense" + }; + + // Identifier. The resource name of the user list direct license. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Immutable. ID of the user list being licensed. + optional int64 user_list_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Name of the user list being licensed. + // + // This field is read-only. + string user_list_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Account type of client customer which the user list is being + // licensed to. + optional UserListLicenseClientAccountType client_account_type = 4 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. ID of client customer which the user list is being licensed to. + optional int64 client_account_id = 5 + [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Name of client customer which the user list is being licensed + // to. + // + // This field is read-only. + string client_account_display_name = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Status of UserListDirectLicense - ENABLED or DISABLED. + optional UserListLicenseStatus status = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. UserListDirectLicense pricing. + UserListLicensePricing pricing = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Pricing history of this user list license. + // + // This field is read-only. + repeated UserListLicensePricing historical_pricings = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metrics related to this license + // + // This field is read-only and only populated if the start and end dates are + // set in the ListUserListDirectLicenses call + UserListLicenseMetrics metrics = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto new file mode 100644 index 00000000000..4964f57d276 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto @@ -0,0 +1,197 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_direct_license.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.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListDirectLicenseServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service for managing user list direct licenses. Delete is not a supported +// operation for UserListDirectLicenses. Callers should update the +// license status to DISABLED to instead to deactivate a license. +// +// This feature is only available to data partners. +service UserListDirectLicenseService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Creates a user list direct license. + // + // This feature is only available to data partners. + rpc CreateUserListDirectLicense(CreateUserListDirectLicenseRequest) + returns (UserListDirectLicense) { + option (google.api.http) = { + post: "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses" + body: "user_list_direct_license" + }; + option (google.api.method_signature) = "parent,user_list_direct_license"; + } + + // Retrieves a user list direct license. + // + // This feature is only available to data partners. + rpc GetUserListDirectLicense(GetUserListDirectLicenseRequest) + returns (UserListDirectLicense) { + option (google.api.http) = { + get: "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a user list direct license. + // + // This feature is only available to data partners. + rpc UpdateUserListDirectLicense(UpdateUserListDirectLicenseRequest) + returns (UserListDirectLicense) { + option (google.api.http) = { + patch: "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}" + body: "user_list_direct_license" + }; + option (google.api.method_signature) = + "user_list_direct_license,update_mask"; + } + + // Lists all user list direct licenses owned by the parent account. + // + // This feature is only available to data partners. + rpc ListUserListDirectLicenses(ListUserListDirectLicensesRequest) + returns (ListUserListDirectLicensesResponse) { + option (google.api.http) = { + get: "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request to create a +// [UserListDirectLicense][google.ads.datamanager.v1.UserListDirectLicense] +// resource. +message CreateUserListDirectLicenseRequest { + // Required. The account that owns the user list being licensed. Should be in + // the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserListDirectLicense" + } + ]; + + // Required. The user list direct license to create. + UserListDirectLicense user_list_direct_license = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to get a +// [UserListDirectLicense][google.ads.datamanager.v1.UserListDirectLicense] +// resource. +message GetUserListDirectLicenseRequest { + // Required. The resource name of the user list direct license. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamanager.googleapis.com/UserListDirectLicense" + } + ]; +} + +// Request to update a +// [UserListDirectLicense][google.ads.datamanager.v1.UserListDirectLicense] +// resource. +message UpdateUserListDirectLicenseRequest { + // Required. The licenses' `name` field is used to identify the license to + // update. + UserListDirectLicense user_list_direct_license = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. The special character `*` is not + // supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to list all +// [UserListDirectLicense][google.ads.datamanager.v1.UserListDirectLicense] +// resources for a given account. +message ListUserListDirectLicensesRequest { + // Required. The account whose licenses are being queried. Should be in the + // format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserListDirectLicense" + } + ]; + + // Optional. Filters to apply to the list request. All fields need to be on + // the left hand side of each condition (for example: user_list_id = 123). + // + // **Supported Operations:** + // + // - `AND` + // - `=` + // - `!=` + // - `>` + // - `>=` + // - `<` + // - `<=` + // + // **Unsupported Fields:** + // + // - `name` (use get method instead) + // - `historical_pricings` and all its subfields + // - `pricing.start_time` + // - `pricing.end_time` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of licenses to return per page. The service + // may return fewer than this value. If unspecified, at most 50 licenses will + // be returned. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListUserListDirectLicense` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [ListUserListDirectLicensesRequest][google.ads.datamanager.v1.ListUserListDirectLicensesRequest]. +message ListUserListDirectLicensesResponse { + // The licenses for the given user list in the request. + repeated UserListDirectLicense user_list_direct_licenses = 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; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto new file mode 100644 index 00000000000..2e0f57ca3cc --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto @@ -0,0 +1,139 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_global_license_type.proto"; +import "google/ads/datamanager/v1/user_list_license_client_account_type.proto"; +import "google/ads/datamanager/v1/user_list_license_metrics.proto"; +import "google/ads/datamanager/v1/user_list_license_pricing.proto"; +import "google/ads/datamanager/v1/user_list_license_status.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListGlobalLicenseProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A user list global license. +// +// This feature is only available to data partners. +message UserListGlobalLicense { + option (google.api.resource) = { + type: "datamanager.googleapis.com/UserListGlobalLicense" + pattern: "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}" + plural: "userListGlobalLicenses" + singular: "userListGlobalLicense" + }; + + // Identifier. The resource name of the user list global license. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Immutable. ID of the user list being licensed. + optional int64 user_list_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Name of the user list being licensed. + // + // This field is read-only. + string user_list_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Product type of client customer which the user list is being + // licensed to. + optional UserListGlobalLicenseType license_type = 4 + [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Status of UserListGlobalLicense - ENABLED or DISABLED. + optional UserListLicenseStatus status = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. UserListGlobalLicense pricing. + UserListLicensePricing pricing = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Pricing history of this user list license. + // + // This field is read-only. + repeated UserListLicensePricing historical_pricings = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metrics related to this license + // + // This field is read-only and only populated if the start and end dates are + // set in the ListUserListGlobalLicenses call + UserListLicenseMetrics metrics = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information about a customer of a user list global license. This will +// automatically be created by the system when a customer purchases a global +// license. +message UserListGlobalLicenseCustomerInfo { + option (google.api.resource) = { + type: "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo" + pattern: "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}" + plural: "userListGlobalLicenseCustomerInfos" + singular: "userListGlobalLicenseCustomerInfo" + }; + + // Identifier. The resource name of the user list global license customer. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. ID of the user list being licensed. + int64 user_list_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the user list being licensed. + string user_list_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Product type of client customer which the user list is being + // licensed to. + UserListGlobalLicenseType license_type = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of UserListDirectLicense - ENABLED or DISABLED. + UserListLicenseStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. UserListDirectLicense pricing. + UserListLicensePricing pricing = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Product type of client customer which the user list is being + // licensed to. + UserListLicenseClientAccountType client_account_type = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of client customer which the user list is being licensed + // to. + int64 client_account_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of client customer which the user list is being licensed + // to. + string client_account_display_name = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Pricing history of this user list license. + repeated UserListLicensePricing historical_pricings = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metrics related to this license + // + // This field is only populated if the start and end dates are set in the + // ListUserListGlobalLicenseCustomerInfos call. + UserListLicenseMetrics metrics = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto new file mode 100644 index 00000000000..26d8335ae72 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto @@ -0,0 +1,275 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_global_license.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.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListGlobalLicenseServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service for managing user list global licenses. Delete is not a supported +// operation for UserListGlobalLicenses. Callers should update the +// license status to DISABLED to instead to deactivate a license. +// +// This feature is only available to data partners. +service UserListGlobalLicenseService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Creates a user list global license. + // + // This feature is only available to data partners. + rpc CreateUserListGlobalLicense(CreateUserListGlobalLicenseRequest) + returns (UserListGlobalLicense) { + option (google.api.http) = { + post: "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses" + body: "user_list_global_license" + }; + option (google.api.method_signature) = "parent,user_list_global_license"; + } + + // Updates a user list global license. + // + // This feature is only available to data partners. + rpc UpdateUserListGlobalLicense(UpdateUserListGlobalLicenseRequest) + returns (UserListGlobalLicense) { + option (google.api.http) = { + patch: "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}" + body: "user_list_global_license" + }; + option (google.api.method_signature) = + "user_list_global_license,update_mask"; + } + + // Retrieves a user list global license. + // + // This feature is only available to data partners. + rpc GetUserListGlobalLicense(GetUserListGlobalLicenseRequest) + returns (UserListGlobalLicense) { + option (google.api.http) = { + get: "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all user list global licenses owned by the parent account. + // + // This feature is only available to data partners. + rpc ListUserListGlobalLicenses(ListUserListGlobalLicensesRequest) + returns (ListUserListGlobalLicensesResponse) { + option (google.api.http) = { + get: "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all customer info for a user list global license. + // + // This feature is only available to data partners. + rpc ListUserListGlobalLicenseCustomerInfos( + ListUserListGlobalLicenseCustomerInfosRequest) + returns (ListUserListGlobalLicenseCustomerInfosResponse) { + option (google.api.http) = { + get: "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request to create a +// [UserListGlobalLicense][google.ads.datamanager.v1.UserListGlobalLicense] +// resource. +message CreateUserListGlobalLicenseRequest { + // Required. The account that owns the user list being licensed. Should be in + // the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserListGlobalLicense" + } + ]; + + // Required. The user list global license to create. + UserListGlobalLicense user_list_global_license = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a +// [UserListGlobalLicense][google.ads.datamanager.v1.UserListGlobalLicense] +// resource. +message UpdateUserListGlobalLicenseRequest { + // Required. The licenses' `name` field is used to identify the license to + // update. + UserListGlobalLicense user_list_global_license = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. The special character `*` is not + // supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to get a +// [UserListGlobalLicense][google.ads.datamanager.v1.UserListGlobalLicense] +// resource. +message GetUserListGlobalLicenseRequest { + // Required. The resource name of the user list global license. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamanager.googleapis.com/UserListGlobalLicense" + } + ]; +} + +// Request to list all +// [UserListGlobalLicense][google.ads.datamanager.v1.UserListGlobalLicense] +// resources for a given account. +message ListUserListGlobalLicensesRequest { + // Required. The account whose licenses are being queried. Should be in the + // format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserListGlobalLicense" + } + ]; + + // Optional. Filters to apply to the list request. All fields need to be on + // the left hand side of each condition (for example: user_list_id = 123). + // + // **Supported Operations:** + // + // - `AND` + // - `=` + // - `!=` + // - `>` + // - `>=` + // - `<` + // - `<=` + // + // **Unsupported Fields:** + // + // - `name` (use get method instead) + // - `historical_pricings` and all its subfields + // - `pricing.start_time` + // - `pricing.end_time` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of licenses to return. The service may return + // fewer than this value. If unspecified, at most 50 licenses will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListUserListDirectLicense` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [ListUserListGlobalLicensesRequest][google.ads.datamanager.v1.ListUserListGlobalLicensesRequest]. +message ListUserListGlobalLicensesResponse { + // The licenses for the given user list in the request. + repeated UserListGlobalLicense user_list_global_licenses = 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 to list all +// [UserListGlobalLicenseCustomerInfo][google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo] +// resources for a given user list global license. +message ListUserListGlobalLicenseCustomerInfosRequest { + // Required. The global license whose customer info are being queried. Should + // be in the format + // `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. + // To list all global license customer info under an account, replace the user + // list global license id with a '-' (for example, + // `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo" + } + ]; + + // Optional. Filters to apply to the list request. All fields need to be on + // the left hand side of each condition (for example: user_list_id = 123). + // + // **Supported Operations:** + // + // - `AND` + // - `=` + // - `!=` + // - `>` + // - `>=` + // - `<` + // - `<=` + // + // **Unsupported Fields:** + // + // - `name` (use get method instead) + // - `historical_pricings` and all its subfields + // - `pricing.start_time` + // - `pricing.end_time` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of licenses to return. The service may return + // fewer than this value. If unspecified, at most 50 licenses will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListUserListDirectLicense` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from the +// [ListUserListGlobalLicensesCustomerInfoRequest][google.ads.datamanager.v1.ListUserListGlobalLicensesCustomerInfoRequest]. +message ListUserListGlobalLicenseCustomerInfosResponse { + // The customer information for the given license in the request. + repeated UserListGlobalLicenseCustomerInfo + user_list_global_license_customer_infos = 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; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto new file mode 100644 index 00000000000..f85d9ed6b74 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto @@ -0,0 +1,40 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListGlobalLicenseTypeProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// User list global license types. +enum UserListGlobalLicenseType { + // UNSPECIFIED. + USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED = 0; + + // Reseller license. + USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER = 1; + + // DataMart Sell Side license. + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE = 2; + + // DataMart Buy Side license. + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE = 3; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto new file mode 100644 index 00000000000..b116e0567f4 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto @@ -0,0 +1,43 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListLicenseClientAccountTypeProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Possible product of a client account for a user list license. +enum UserListLicenseClientAccountType { + // Unknown. + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN = 0; + + // Google Ads customer. + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS = 1; + + // Display & Video 360 partner. + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER = 2; + + // Display & Video 360 advertiser. + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER = 3; + + // Google Ad Manager audience link. + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK = 4; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto new file mode 100644 index 00000000000..0aceb2c6951 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto @@ -0,0 +1,53 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListLicenseMetricsProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Metrics related to a user list license. +message UserListLicenseMetrics { + // Output only. The number of clicks for the user list license. + int64 click_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of impressions for the user list license. + int64 impression_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revenue for the user list license in USD micros. + int64 revenue_usd_micros = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The start date (inclusive) of the metrics in the format + // YYYYMMDD. For example, 20260102 represents January 2, 2026. If `end_date` + // is used in the filter, `start_date` is also required. If neither + // `start_date` nor `end_date` are included in the filter, the + // UserListLicenseMetrics fields will not be populated in the response. + int64 start_date = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end date (inclusive) of the metrics in the format + // YYYYMMDD. For example, 20260102 represents January 2, 2026. If `start_date` + // is used in the filter, `end_date` is also required. If neither `start_date` + // nor `end_date` are included in the filter, the UserListLicenseMetrics + // fields will not be populated in the response. + int64 end_date = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto new file mode 100644 index 00000000000..c8712b7de1a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListLicensePricingProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// A user list license pricing. +message UserListLicensePricing { + // User list pricing buyer approval state. + enum UserListPricingBuyerApprovalState { + // UNSPECIFIED. + USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED = 0; + + // User list client has not yet accepted the pricing terms set by the user + // list owner. + PENDING = 1; + + // User list client has accepted the pricing terms set by the user list + // owner. + APPROVED = 2; + + // User list client has rejected the pricing terms set by the user list + // owner. + REJECTED = 3; + } + + // User list pricing cost type. + enum UserListPricingCostType { + // Unspecified. + USER_LIST_PRICING_COST_TYPE_UNSPECIFIED = 0; + + // Cost per click. + CPC = 1; + + // Cost per mille (thousand impressions). + CPM = 2; + + // Media share. + MEDIA_SHARE = 3; + } + + // Output only. The ID of this pricing. + int64 pricing_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The cost associated with the model, in micro units (10^-6), in + // the currency specified by the currency_code field. For example, 2000000 + // means $2 if `currency_code` is `USD`. + optional int64 cost_micros = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The currency in which cost and max_cost is specified. Must be a + // three-letter currency code defined in ISO 4217. + optional string currency_code = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Start time of the pricing. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. End time of the pricing. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether this pricing is active. + bool pricing_active = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The buyer approval state of this pricing. + // + // This field is read-only. + UserListPricingBuyerApprovalState buyer_approval_state = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The cost type of this pricing. + // + // Can be set only in the `create` operation. Can't be updated for + // an existing license. + optional UserListPricingCostType cost_type = 7 + [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. The maximum CPM a commerce audience can be charged when the + // MEDIA_SHARE cost type is used. The value is in micro units (10^-6) and in + // the currency specified by the currency_code field. For example, 2000000 + // means $2 if `currency_code` is `USD`. + // + // This is only relevant when cost_type is MEDIA_SHARE. + // When cost_type is not MEDIA_SHARE, and this field is set, a + // MAX_COST_NOT_ALLOWED error will be returned. + // If not set or set to`0`, there is no cap. + optional int64 max_cost_micros = 8 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto new file mode 100644 index 00000000000..5a16e961d04 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto @@ -0,0 +1,37 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListLicenseStatusProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// User list license status. +enum UserListLicenseStatus { + // Unknown. + USER_LIST_LICENSE_STATUS_UNSPECIFIED = 0; + + // Active status - user list is still being licensed. + USER_LIST_LICENSE_STATUS_ENABLED = 1; + + // Inactive status - user list is no longer being licensed. + USER_LIST_LICENSE_STATUS_DISABLED = 2; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto new file mode 100644 index 00000000000..8a7595f46df --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto @@ -0,0 +1,272 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list.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/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "UserListServiceProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Service for managing UserList resources. +service UserListService { + option (google.api.default_host) = "datamanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/datamanager"; + + // Gets a UserList. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc GetUserList(GetUserListRequest) returns (UserList) { + option (google.api.http) = { + get: "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists UserLists. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc ListUserLists(ListUserListsRequest) returns (ListUserListsResponse) { + option (google.api.http) = { + get: "/v1/{parent=accountTypes/*/accounts/*}/userLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a UserList. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc CreateUserList(CreateUserListRequest) returns (UserList) { + option (google.api.http) = { + post: "/v1/{parent=accountTypes/*/accounts/*}/userLists" + body: "user_list" + }; + option (google.api.method_signature) = "parent,user_list"; + } + + // Updates a UserList. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc UpdateUserList(UpdateUserListRequest) returns (UserList) { + option (google.api.http) = { + patch: "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}" + body: "user_list" + }; + option (google.api.method_signature) = "user_list,update_mask"; + } + + // Deletes a UserList. + // + // Authorization Headers: + // + // This method supports the following optional headers to define how the API + // authorizes access for the request: + // + // * `login-account`: (Optional) The resource name of the account where the + // Google Account of the credentials is a user. If not set, defaults to the + // account of the request. Format: + // `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + // * `linked-account`: (Optional) The resource name of the account with an + // established product link to the `login-account`. Format: + // `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + rpc DeleteUserList(DeleteUserListRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for GetUserList. +message GetUserListRequest { + // Required. The resource name of the UserList to retrieve. + // Format: + // accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamanager.googleapis.com/UserList" + } + ]; +} + +// Request message for ListUserLists. +message ListUserListsRequest { + // Required. The parent account which owns this collection of user lists. + // Format: accountTypes/{account_type}/accounts/{account} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserList" + } + ]; + + // Optional. The maximum number of user lists to return. The service may + // return fewer than this value. If unspecified, at most 50 user lists 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 `ListUserLists` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListUserLists` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A [filter string](//google.aip.dev/160). All fields need to be on + // the left hand side of each condition (for example: `display_name = "list + // 1"`). + // + // Supported operations: + // + // - `AND` + // - `=` + // - `!=` + // - `>` + // - `>=` + // - `<` + // - `<=` + // - `:` (has) + // + // Supported fields: + // + // - `id` + // - `display_name` + // - `description` + // - `membership_status` + // - `integration_code` + // - `access_reason` + // - `ingested_user_list_info.upload_key_types` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListUserLists. +message ListUserListsResponse { + // The user lists from the specified account. + repeated UserList user_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. + string next_page_token = 2; +} + +// Request message for CreateUserList. +message CreateUserListRequest { + // Required. The parent account where this user list will be created. + // Format: accountTypes/{account_type}/accounts/{account} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamanager.googleapis.com/UserList" + } + ]; + + // Required. The user list to create. + UserList user_list = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the request is validated but not executed. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateUserList. +message UpdateUserListRequest { + // Required. The user list to update. + // + // The user list's `name` field is used to identify the user list to update. + // Format: + // accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + UserList user_list = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the request is validated but not executed. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteUserList. +message DeleteUserListRequest { + // Required. The name of the user list to delete. + // Format: + // accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamanager.googleapis.com/UserList" + } + ]; + + // Optional. If true, the request is validated but not executed. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto new file mode 100644 index 00000000000..75c59e2b030 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto @@ -0,0 +1,87 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +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]; + + // Optional. A bucket of any additional [user + // properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) + // for the user associated with this event. + repeated UserProperty additional_user_properties = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A bucket of any additional [user +// properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) +// for the user associated with this event. +message UserProperty { + // Required. The name of the user property to use. + string property_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string representation of the value of the user property to + // use. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// 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/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts b/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts new file mode 100644 index 00000000000..db34d7f0bd5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts @@ -0,0 +1,18315 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 { + + /** AgeRange enum. */ + enum AgeRange { + AGE_RANGE_UNSPECIFIED = 0, + AGE_RANGE_UNKNOWN = 1, + AGE_RANGE_18_24 = 2, + AGE_RANGE_25_34 = 3, + AGE_RANGE_35_44 = 4, + AGE_RANGE_45_54 = 5, + AGE_RANGE_55_64 = 6, + AGE_RANGE_65_UP = 7 + } + + /** 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 userIdData */ + userIdData?: (google.ads.datamanager.v1.IUserIdData|null); + + /** AudienceMember ppidData */ + ppidData?: (google.ads.datamanager.v1.IPpidData|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 userIdData. */ + public userIdData?: (google.ads.datamanager.v1.IUserIdData|null); + + /** AudienceMember ppidData. */ + public ppidData?: (google.ads.datamanager.v1.IPpidData|null); + + /** AudienceMember consent. */ + public consent?: (google.ads.datamanager.v1.IConsent|null); + + /** AudienceMember data. */ + public data?: ("userData"|"pairData"|"mobileData"|"userIdData"|"ppidData"); + + /** + * 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 UserIdData. */ + interface IUserIdData { + + /** UserIdData userId */ + userId?: (string|null); + } + + /** Represents a UserIdData. */ + class UserIdData implements IUserIdData { + + /** + * Constructs a new UserIdData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserIdData); + + /** UserIdData userId. */ + public userId: string; + + /** + * Creates a new UserIdData instance using the specified properties. + * @param [properties] Properties to set + * @returns UserIdData instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserIdData): google.ads.datamanager.v1.UserIdData; + + /** + * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @param message UserIdData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @param message UserIdData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserIdData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserIdData + * @throws {Error} If the payload is not a 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.UserIdData; + + /** + * Decodes a UserIdData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserIdData + * @throws {Error} If the payload is 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.UserIdData; + + /** + * Verifies a UserIdData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserIdData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdData; + + /** + * Creates a plain object from a UserIdData message. Also converts values to other types if specified. + * @param message UserIdData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserIdData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserIdData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserIdData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PpidData. */ + interface IPpidData { + + /** PpidData ppids */ + ppids?: (string[]|null); + } + + /** Represents a PpidData. */ + class PpidData implements IPpidData { + + /** + * Constructs a new PpidData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPpidData); + + /** PpidData ppids. */ + public ppids: string[]; + + /** + * Creates a new PpidData instance using the specified properties. + * @param [properties] Properties to set + * @returns PpidData instance + */ + public static create(properties?: google.ads.datamanager.v1.IPpidData): google.ads.datamanager.v1.PpidData; + + /** + * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @param message PpidData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @param message PpidData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PpidData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PpidData + * @throws {Error} If the payload is not a 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.PpidData; + + /** + * Decodes a PpidData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PpidData + * @throws {Error} If the payload is 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.PpidData; + + /** + * Verifies a PpidData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PpidData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PpidData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PpidData; + + /** + * Creates a plain object from a PpidData message. Also converts values to other types if specified. + * @param message PpidData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PpidData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PpidData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PpidData + * @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); + + /** Item itemId */ + itemId?: (string|null); + + /** Item additionalItemParameters */ + additionalItemParameters?: (google.ads.datamanager.v1.IItemParameter[]|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; + + /** Item itemId. */ + public itemId: string; + + /** Item additionalItemParameters. */ + public additionalItemParameters: google.ads.datamanager.v1.IItemParameter[]; + + /** + * 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 an ItemParameter. */ + interface IItemParameter { + + /** ItemParameter parameterName */ + parameterName?: (string|null); + + /** ItemParameter value */ + value?: (string|null); + } + + /** Represents an ItemParameter. */ + class ItemParameter implements IItemParameter { + + /** + * Constructs a new ItemParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IItemParameter); + + /** ItemParameter parameterName. */ + public parameterName: string; + + /** ItemParameter value. */ + public value: string; + + /** + * Creates a new ItemParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns ItemParameter instance + */ + public static create(properties?: google.ads.datamanager.v1.IItemParameter): google.ads.datamanager.v1.ItemParameter; + + /** + * Encodes the specified ItemParameter message. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. + * @param message ItemParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IItemParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ItemParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. + * @param message ItemParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IItemParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ItemParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ItemParameter + * @throws {Error} If the payload is not a 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.ItemParameter; + + /** + * Decodes an ItemParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ItemParameter + * @throws {Error} If the payload is 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.ItemParameter; + + /** + * Verifies an ItemParameter message. + * @param message Plain 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 ItemParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ItemParameter + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ItemParameter; + + /** + * Creates a plain object from an ItemParameter message. Also converts values to other types if specified. + * @param message ItemParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ItemParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ItemParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ItemParameter + * @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, + GOOGLE_ANALYTICS_PROPERTY = 5, + GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6 + } + } + + /** 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); + + /** EncryptionInfo awsWrappedKeyInfo */ + awsWrappedKeyInfo?: (google.ads.datamanager.v1.IAwsWrappedKeyInfo|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 awsWrappedKeyInfo. */ + public awsWrappedKeyInfo?: (google.ads.datamanager.v1.IAwsWrappedKeyInfo|null); + + /** EncryptionInfo wrappedKey. */ + public wrappedKey?: ("gcpWrappedKeyInfo"|"awsWrappedKeyInfo"); + + /** + * 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 + } + } + + /** Properties of an AwsWrappedKeyInfo. */ + interface IAwsWrappedKeyInfo { + + /** AwsWrappedKeyInfo keyType */ + keyType?: (google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|null); + + /** AwsWrappedKeyInfo roleArn */ + roleArn?: (string|null); + + /** AwsWrappedKeyInfo kekUri */ + kekUri?: (string|null); + + /** AwsWrappedKeyInfo encryptedDek */ + encryptedDek?: (string|null); + } + + /** Represents an AwsWrappedKeyInfo. */ + class AwsWrappedKeyInfo implements IAwsWrappedKeyInfo { + + /** + * Constructs a new AwsWrappedKeyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IAwsWrappedKeyInfo); + + /** AwsWrappedKeyInfo keyType. */ + public keyType: (google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType); + + /** AwsWrappedKeyInfo roleArn. */ + public roleArn: string; + + /** AwsWrappedKeyInfo kekUri. */ + public kekUri: string; + + /** AwsWrappedKeyInfo encryptedDek. */ + public encryptedDek: string; + + /** + * Creates a new AwsWrappedKeyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsWrappedKeyInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IAwsWrappedKeyInfo): google.ads.datamanager.v1.AwsWrappedKeyInfo; + + /** + * Encodes the specified AwsWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. + * @param message AwsWrappedKeyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IAwsWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. + * @param message AwsWrappedKeyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IAwsWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsWrappedKeyInfo + * @throws {Error} If the payload is not a 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.AwsWrappedKeyInfo; + + /** + * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsWrappedKeyInfo + * @throws {Error} If the payload is 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.AwsWrappedKeyInfo; + + /** + * Verifies an AwsWrappedKeyInfo message. + * @param message Plain 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 AwsWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsWrappedKeyInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.AwsWrappedKeyInfo; + + /** + * Creates a plain object from an AwsWrappedKeyInfo message. Also converts values to other types if specified. + * @param message AwsWrappedKeyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.AwsWrappedKeyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsWrappedKeyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsWrappedKeyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AwsWrappedKeyInfo { + + /** 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, + UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER = 37, + UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER = 38, + NO_IDENTIFIERS_PROVIDED = 39, + INVALID_PROPERTY_TYPE = 40, + INVALID_STREAM_TYPE = 41, + LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT = 42, + OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH = 43, + EVENT_TIME_INVALID = 44, + RESERVED_NAME_USED = 45, + INVALID_EVENT_NAME = 46, + NOT_ALLOWLISTED = 47, + INVALID_REQUEST_ID = 48, + MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT = 49, + FIELD_VALUE_TOO_LONG = 50, + TOO_MANY_ELEMENTS = 51, + ALREADY_EXISTS = 52, + IMMUTABLE_FIELD_FOR_UPDATE = 53, + INVALID_RESOURCE_NAME = 54, + INVALID_FILTER = 55, + INVALID_UPDATE_MASK = 56, + INVALID_PAGE_TOKEN = 57, + CANNOT_UPDATE_DISABLED_LICENSE = 58, + CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59, + INSUFFICIENT_COST = 60, + CANNOT_DISABLE_LICENSE = 61, + INVALID_CLIENT_ACCOUNT_ID = 62, + PRICING_ONLY_ZERO_COST_ALLOWED = 63, + PRICE_TOO_HIGH = 64, + CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65, + INVALID_PRICING_END_DATE = 66, + CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67, + MISMATCHED_ACCOUNT_TYPE = 68, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70, + INVALID_MEDIA_SHARE_COST = 71, + INVALID_COST_TYPE = 72, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73, + MAX_COST_NOT_ALLOWED = 74, + COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75, + INVALID_DESCRIPTION = 76, + INVALID_DISPLAY_NAME = 77, + DISPLAY_NAME_ALREADY_USED = 78, + OWNERSHIP_REQUIRED_FOR_UPDATE = 79, + USER_LIST_MUTATION_NOT_SUPPORTED = 80, + SENSITIVE_USER_LIST_IMMUTABLE = 81, + BILLABLE_RECORD_COUNT_IMMUTABLE = 82, + USER_LIST_NAME_RESERVED = 83, + ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84, + UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85, + COMMERCE_PARTNER_NOT_ALLOWED = 86, + UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87, + PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88, + DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89, + ADVERTISER_TOS_NOT_ACCEPTED = 90, + ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91, + USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92, + INVALID_COMMERCE_PARTNER = 93, + CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94, + UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95, + UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96, + UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97, + UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98 + } + + /** 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); + + /** Event eventName */ + eventName?: (string|null); + + /** Event clientId */ + clientId?: (string|null); + + /** Event userId */ + userId?: (string|null); + + /** Event additionalEventParameters */ + additionalEventParameters?: (google.ads.datamanager.v1.IEventParameter[]|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|null); + + /** 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); + + /** Event eventName. */ + public eventName: string; + + /** Event clientId. */ + public clientId: string; + + /** Event userId. */ + public userId: string; + + /** Event additionalEventParameters. */ + public additionalEventParameters: google.ads.datamanager.v1.IEventParameter[]; + + /** + * 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; + } + + /** Properties of an EventParameter. */ + interface IEventParameter { + + /** EventParameter parameterName */ + parameterName?: (string|null); + + /** EventParameter value */ + value?: (string|null); + } + + /** Represents an EventParameter. */ + class EventParameter implements IEventParameter { + + /** + * Constructs a new EventParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IEventParameter); + + /** EventParameter parameterName. */ + public parameterName: string; + + /** EventParameter value. */ + public value: string; + + /** + * Creates a new EventParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns EventParameter instance + */ + public static create(properties?: google.ads.datamanager.v1.IEventParameter): google.ads.datamanager.v1.EventParameter; + + /** + * Encodes the specified EventParameter message. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. + * @param message EventParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IEventParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. + * @param message EventParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IEventParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventParameter + * @throws {Error} If the payload is not a 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.EventParameter; + + /** + * Decodes an EventParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventParameter + * @throws {Error} If the payload is 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.EventParameter; + + /** + * Verifies an EventParameter message. + * @param message Plain 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 EventParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventParameter + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.EventParameter; + + /** + * Creates a plain object from an EventParameter message. Also converts values to other types if specified. + * @param message EventParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.EventParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventParameter + * @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); + + /** UserProperties additionalUserProperties */ + additionalUserProperties?: (google.ads.datamanager.v1.IUserProperty[]|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); + + /** UserProperties additionalUserProperties. */ + public additionalUserProperties: google.ads.datamanager.v1.IUserProperty[]; + + /** + * 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; + } + + /** Properties of a UserProperty. */ + interface IUserProperty { + + /** UserProperty propertyName */ + propertyName?: (string|null); + + /** UserProperty value */ + value?: (string|null); + } + + /** Represents a UserProperty. */ + class UserProperty implements IUserProperty { + + /** + * Constructs a new UserProperty. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserProperty); + + /** UserProperty propertyName. */ + public propertyName: string; + + /** UserProperty value. */ + public value: string; + + /** + * Creates a new UserProperty instance using the specified properties. + * @param [properties] Properties to set + * @returns UserProperty instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserProperty): google.ads.datamanager.v1.UserProperty; + + /** + * Encodes the specified UserProperty message. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. + * @param message UserProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserProperty message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. + * @param message UserProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserProperty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserProperty + * @throws {Error} If the payload is not a 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.UserProperty; + + /** + * Decodes a UserProperty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserProperty + * @throws {Error} If the payload is 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.UserProperty; + + /** + * Verifies a UserProperty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserProperty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserProperty + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserProperty; + + /** + * Creates a plain object from a UserProperty message. Also converts values to other types if specified. + * @param message UserProperty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserProperty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserProperty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserProperty + * @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 + } + + /** Gender enum. */ + enum Gender { + GENDER_UNSPECIFIED = 0, + GENDER_UNKNOWN = 1, + GENDER_MALE = 2, + GENDER_FEMALE = 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); + + /** IngestAudienceMembersStatus userIdDataIngestionStatus */ + userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); + + /** IngestAudienceMembersStatus ppidDataIngestionStatus */ + ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|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 userIdDataIngestionStatus. */ + public userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); + + /** IngestAudienceMembersStatus ppidDataIngestionStatus. */ + public ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null); + + /** IngestAudienceMembersStatus status. */ + public status?: ("userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"); + + /** + * 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); + + /** RemoveAudienceMembersStatus userIdDataRemovalStatus */ + userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); + + /** RemoveAudienceMembersStatus ppidDataRemovalStatus */ + ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|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 userIdDataRemovalStatus. */ + public userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); + + /** RemoveAudienceMembersStatus ppidDataRemovalStatus. */ + public ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null); + + /** RemoveAudienceMembersStatus status. */ + public status?: ("userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"); + + /** + * 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; + } + + /** Properties of an IngestUserIdDataStatus. */ + interface IIngestUserIdDataStatus { + + /** IngestUserIdDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestUserIdDataStatus userIdCount */ + userIdCount?: (number|Long|string|null); + } + + /** Represents an IngestUserIdDataStatus. */ + class IngestUserIdDataStatus implements IIngestUserIdDataStatus { + + /** + * Constructs a new IngestUserIdDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus); + + /** IngestUserIdDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestUserIdDataStatus userIdCount. */ + public userIdCount: (number|Long|string); + + /** + * Creates a new IngestUserIdDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestUserIdDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; + + /** + * Encodes the specified IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @param message IngestUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @param message IngestUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestUserIdDataStatus + * @throws {Error} If the payload is not a 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.IngestUserIdDataStatus; + + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestUserIdDataStatus + * @throws {Error} If the payload is 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.IngestUserIdDataStatus; + + /** + * Verifies an IngestUserIdDataStatus message. + * @param message Plain 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 IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestUserIdDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; + + /** + * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. + * @param message IngestUserIdDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestUserIdDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestUserIdDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveUserIdDataStatus. */ + interface IRemoveUserIdDataStatus { + + /** RemoveUserIdDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemoveUserIdDataStatus userIdCount */ + userIdCount?: (number|Long|string|null); + } + + /** Represents a RemoveUserIdDataStatus. */ + class RemoveUserIdDataStatus implements IRemoveUserIdDataStatus { + + /** + * Constructs a new RemoveUserIdDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus); + + /** RemoveUserIdDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemoveUserIdDataStatus userIdCount. */ + public userIdCount: (number|Long|string); + + /** + * Creates a new RemoveUserIdDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveUserIdDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; + + /** + * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @param message RemoveUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @param message RemoveUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveUserIdDataStatus + * @throws {Error} If the payload is not a 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.RemoveUserIdDataStatus; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveUserIdDataStatus + * @throws {Error} If the payload is 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.RemoveUserIdDataStatus; + + /** + * Verifies a RemoveUserIdDataStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveUserIdDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; + + /** + * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. + * @param message RemoveUserIdDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveUserIdDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveUserIdDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestPpidDataStatus. */ + interface IIngestPpidDataStatus { + + /** IngestPpidDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestPpidDataStatus ppidCount */ + ppidCount?: (number|Long|string|null); + } + + /** Represents an IngestPpidDataStatus. */ + class IngestPpidDataStatus implements IIngestPpidDataStatus { + + /** + * Constructs a new IngestPpidDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus); + + /** IngestPpidDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestPpidDataStatus ppidCount. */ + public ppidCount: (number|Long|string); + + /** + * Creates a new IngestPpidDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestPpidDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; + + /** + * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @param message IngestPpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @param message IngestPpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestPpidDataStatus + * @throws {Error} If the payload is not a 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.IngestPpidDataStatus; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestPpidDataStatus + * @throws {Error} If the payload is 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.IngestPpidDataStatus; + + /** + * Verifies an IngestPpidDataStatus message. + * @param message Plain 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 IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestPpidDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; + + /** + * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. + * @param message IngestPpidDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestPpidDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestPpidDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePpidDataStatus. */ + interface IRemovePpidDataStatus { + + /** RemovePpidDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemovePpidDataStatus ppidCount */ + ppidCount?: (number|Long|string|null); + } + + /** Represents a RemovePpidDataStatus. */ + class RemovePpidDataStatus implements IRemovePpidDataStatus { + + /** + * Constructs a new RemovePpidDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus); + + /** RemovePpidDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemovePpidDataStatus ppidCount. */ + public ppidCount: (number|Long|string); + + /** + * Creates a new RemovePpidDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePpidDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; + + /** + * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @param message RemovePpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @param message RemovePpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePpidDataStatus + * @throws {Error} If the payload is not a 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.RemovePpidDataStatus; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePpidDataStatus + * @throws {Error} If the payload is 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.RemovePpidDataStatus; + + /** + * Verifies a RemovePpidDataStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePpidDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; + + /** + * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. + * @param message RemovePpidDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePpidDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePpidDataStatus + * @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_AWS_AUTH_FAILED = 27, + 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, + PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9 + } + + /** 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 + } + + /** Represents a MarketingDataInsightsService */ + class MarketingDataInsightsService extends $protobuf.rpc.Service { + + /** + * Constructs a new MarketingDataInsightsService 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 MarketingDataInsightsService 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): MarketingDataInsightsService; + + /** + * Calls RetrieveInsights. + * @param request RetrieveInsightsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RetrieveInsightsResponse + */ + public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest, callback: google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback): void; + + /** + * Calls RetrieveInsights. + * @param request RetrieveInsightsRequest message or plain object + * @returns Promise + */ + public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest): Promise; + } + + namespace MarketingDataInsightsService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. + * @param error Error, if any + * @param [response] RetrieveInsightsResponse + */ + type RetrieveInsightsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.RetrieveInsightsResponse) => void; + } + + /** Properties of a RetrieveInsightsRequest. */ + interface IRetrieveInsightsRequest { + + /** RetrieveInsightsRequest parent */ + parent?: (string|null); + + /** RetrieveInsightsRequest baseline */ + baseline?: (google.ads.datamanager.v1.IBaseline|null); + + /** RetrieveInsightsRequest userListId */ + userListId?: (string|null); + } + + /** Represents a RetrieveInsightsRequest. */ + class RetrieveInsightsRequest implements IRetrieveInsightsRequest { + + /** + * Constructs a new RetrieveInsightsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest); + + /** RetrieveInsightsRequest parent. */ + public parent: string; + + /** RetrieveInsightsRequest baseline. */ + public baseline?: (google.ads.datamanager.v1.IBaseline|null); + + /** RetrieveInsightsRequest userListId. */ + public userListId: string; + + /** + * Creates a new RetrieveInsightsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveInsightsRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest): google.ads.datamanager.v1.RetrieveInsightsRequest; + + /** + * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @param message RetrieveInsightsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @param message RetrieveInsightsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveInsightsRequest + * @throws {Error} If the payload is not a 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.RetrieveInsightsRequest; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveInsightsRequest + * @throws {Error} If the payload is 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.RetrieveInsightsRequest; + + /** + * Verifies a RetrieveInsightsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveInsightsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsRequest; + + /** + * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. + * @param message RetrieveInsightsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveInsightsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveInsightsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Baseline. */ + interface IBaseline { + + /** Baseline baselineLocation */ + baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); + + /** Baseline locationAutoDetectionEnabled */ + locationAutoDetectionEnabled?: (boolean|null); + } + + /** Represents a Baseline. */ + class Baseline implements IBaseline { + + /** + * Constructs a new Baseline. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IBaseline); + + /** Baseline baselineLocation. */ + public baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); + + /** Baseline locationAutoDetectionEnabled. */ + public locationAutoDetectionEnabled?: (boolean|null); + + /** Baseline baseline. */ + public baseline?: ("baselineLocation"|"locationAutoDetectionEnabled"); + + /** + * Creates a new Baseline instance using the specified properties. + * @param [properties] Properties to set + * @returns Baseline instance + */ + public static create(properties?: google.ads.datamanager.v1.IBaseline): google.ads.datamanager.v1.Baseline; + + /** + * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @param message Baseline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @param message Baseline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Baseline message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Baseline + * @throws {Error} If the payload is not a 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.Baseline; + + /** + * Decodes a Baseline message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Baseline + * @throws {Error} If the payload is 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.Baseline; + + /** + * Verifies a Baseline message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Baseline message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Baseline + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Baseline; + + /** + * Creates a plain object from a Baseline message. Also converts values to other types if specified. + * @param message Baseline + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Baseline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Baseline to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Baseline + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Baseline { + + /** Properties of a Location. */ + interface ILocation { + + /** Location regionCodes */ + regionCodes?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.Baseline.ILocation); + + /** Location regionCodes. */ + public regionCodes: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.ads.datamanager.v1.Baseline.ILocation): google.ads.datamanager.v1.Baseline.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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 RetrieveInsightsResponse. */ + interface IRetrieveInsightsResponse { + + /** RetrieveInsightsResponse marketingDataInsights */ + marketingDataInsights?: (google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]|null); + } + + /** Represents a RetrieveInsightsResponse. */ + class RetrieveInsightsResponse implements IRetrieveInsightsResponse { + + /** + * Constructs a new RetrieveInsightsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse); + + /** RetrieveInsightsResponse marketingDataInsights. */ + public marketingDataInsights: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]; + + /** + * Creates a new RetrieveInsightsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveInsightsResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse): google.ads.datamanager.v1.RetrieveInsightsResponse; + + /** + * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @param message RetrieveInsightsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @param message RetrieveInsightsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveInsightsResponse + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveInsightsResponse + * @throws {Error} If the payload is 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.RetrieveInsightsResponse; + + /** + * Verifies a RetrieveInsightsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveInsightsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse; + + /** + * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. + * @param message RetrieveInsightsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveInsightsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveInsightsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RetrieveInsightsResponse { + + /** Properties of a MarketingDataInsight. */ + interface IMarketingDataInsight { + + /** MarketingDataInsight dimension */ + dimension?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null); + + /** MarketingDataInsight attributes */ + attributes?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]|null); + } + + /** Represents a MarketingDataInsight. */ + class MarketingDataInsight implements IMarketingDataInsight { + + /** + * Constructs a new MarketingDataInsight. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight); + + /** MarketingDataInsight dimension. */ + public dimension: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension); + + /** MarketingDataInsight attributes. */ + public attributes: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]; + + /** + * Creates a new MarketingDataInsight instance using the specified properties. + * @param [properties] Properties to set + * @returns MarketingDataInsight instance + */ + public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @param message MarketingDataInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @param message MarketingDataInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarketingDataInsight + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarketingDataInsight + * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Verifies a MarketingDataInsight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarketingDataInsight + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. + * @param message MarketingDataInsight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarketingDataInsight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingDataInsight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MarketingDataInsight { + + /** AudienceInsightsDimension enum. */ + enum AudienceInsightsDimension { + AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED = 0, + AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN = 1, + AFFINITY_USER_INTEREST = 2, + IN_MARKET_USER_INTEREST = 3, + AGE_RANGE = 4, + GENDER = 5 + } + + /** Properties of a MarketingDataInsightsAttribute. */ + interface IMarketingDataInsightsAttribute { + + /** MarketingDataInsightsAttribute userInterestId */ + userInterestId?: (number|Long|string|null); + + /** MarketingDataInsightsAttribute lift */ + lift?: (number|null); + + /** MarketingDataInsightsAttribute ageRange */ + ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); + + /** MarketingDataInsightsAttribute gender */ + gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); + } + + /** Represents a MarketingDataInsightsAttribute. */ + class MarketingDataInsightsAttribute implements IMarketingDataInsightsAttribute { + + /** + * Constructs a new MarketingDataInsightsAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute); + + /** MarketingDataInsightsAttribute userInterestId. */ + public userInterestId?: (number|Long|string|null); + + /** MarketingDataInsightsAttribute lift. */ + public lift?: (number|null); + + /** MarketingDataInsightsAttribute ageRange. */ + public ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); + + /** MarketingDataInsightsAttribute gender. */ + public gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); + + /** + * Creates a new MarketingDataInsightsAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns MarketingDataInsightsAttribute instance + */ + public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @param message MarketingDataInsightsAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @param message MarketingDataInsightsAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarketingDataInsightsAttribute + * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Verifies a MarketingDataInsightsAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarketingDataInsightsAttribute + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. + * @param message MarketingDataInsightsAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarketingDataInsightsAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingDataInsightsAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Represents a PartnerLinkService */ + class PartnerLinkService extends $protobuf.rpc.Service { + + /** + * Constructs a new PartnerLinkService 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 PartnerLinkService 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): PartnerLinkService; + + /** + * Calls CreatePartnerLink. + * @param request CreatePartnerLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PartnerLink + */ + public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback): void; + + /** + * Calls CreatePartnerLink. + * @param request CreatePartnerLinkRequest message or plain object + * @returns Promise + */ + public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest): Promise; + + /** + * Calls DeletePartnerLink. + * @param request DeletePartnerLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback): void; + + /** + * Calls DeletePartnerLink. + * @param request DeletePartnerLinkRequest message or plain object + * @returns Promise + */ + public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest): Promise; + + /** + * Calls SearchPartnerLinks. + * @param request SearchPartnerLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse + */ + public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest, callback: google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback): void; + + /** + * Calls SearchPartnerLinks. + * @param request SearchPartnerLinksRequest message or plain object + * @returns Promise + */ + public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest): Promise; + } + + namespace PartnerLinkService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. + * @param error Error, if any + * @param [response] PartnerLink + */ + type CreatePartnerLinkCallback = (error: (Error|null), response?: google.ads.datamanager.v1.PartnerLink) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePartnerLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. + * @param error Error, if any + * @param [response] SearchPartnerLinksResponse + */ + type SearchPartnerLinksCallback = (error: (Error|null), response?: google.ads.datamanager.v1.SearchPartnerLinksResponse) => void; + } + + /** Properties of a CreatePartnerLinkRequest. */ + interface ICreatePartnerLinkRequest { + + /** CreatePartnerLinkRequest parent */ + parent?: (string|null); + + /** CreatePartnerLinkRequest partnerLink */ + partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); + } + + /** Represents a CreatePartnerLinkRequest. */ + class CreatePartnerLinkRequest implements ICreatePartnerLinkRequest { + + /** + * Constructs a new CreatePartnerLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest); + + /** CreatePartnerLinkRequest parent. */ + public parent: string; + + /** CreatePartnerLinkRequest partnerLink. */ + public partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); + + /** + * Creates a new CreatePartnerLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePartnerLinkRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest): google.ads.datamanager.v1.CreatePartnerLinkRequest; + + /** + * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @param message CreatePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @param message CreatePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePartnerLinkRequest + * @throws {Error} If the payload is not a 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.CreatePartnerLinkRequest; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePartnerLinkRequest + * @throws {Error} If the payload is 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.CreatePartnerLinkRequest; + + /** + * Verifies a CreatePartnerLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePartnerLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreatePartnerLinkRequest; + + /** + * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. + * @param message CreatePartnerLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreatePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePartnerLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePartnerLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePartnerLinkRequest. */ + interface IDeletePartnerLinkRequest { + + /** DeletePartnerLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeletePartnerLinkRequest. */ + class DeletePartnerLinkRequest implements IDeletePartnerLinkRequest { + + /** + * Constructs a new DeletePartnerLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest); + + /** DeletePartnerLinkRequest name. */ + public name: string; + + /** + * Creates a new DeletePartnerLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePartnerLinkRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest): google.ads.datamanager.v1.DeletePartnerLinkRequest; + + /** + * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @param message DeletePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @param message DeletePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePartnerLinkRequest + * @throws {Error} If the payload is not a 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.DeletePartnerLinkRequest; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePartnerLinkRequest + * @throws {Error} If the payload is 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.DeletePartnerLinkRequest; + + /** + * Verifies a DeletePartnerLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePartnerLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeletePartnerLinkRequest; + + /** + * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. + * @param message DeletePartnerLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.DeletePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePartnerLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePartnerLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchPartnerLinksRequest. */ + interface ISearchPartnerLinksRequest { + + /** SearchPartnerLinksRequest parent */ + parent?: (string|null); + + /** SearchPartnerLinksRequest pageSize */ + pageSize?: (number|null); + + /** SearchPartnerLinksRequest pageToken */ + pageToken?: (string|null); + + /** SearchPartnerLinksRequest filter */ + filter?: (string|null); + } + + /** Represents a SearchPartnerLinksRequest. */ + class SearchPartnerLinksRequest implements ISearchPartnerLinksRequest { + + /** + * Constructs a new SearchPartnerLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest); + + /** SearchPartnerLinksRequest parent. */ + public parent: string; + + /** SearchPartnerLinksRequest pageSize. */ + public pageSize: number; + + /** SearchPartnerLinksRequest pageToken. */ + public pageToken: string; + + /** SearchPartnerLinksRequest filter. */ + public filter: string; + + /** + * Creates a new SearchPartnerLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchPartnerLinksRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest): google.ads.datamanager.v1.SearchPartnerLinksRequest; + + /** + * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @param message SearchPartnerLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @param message SearchPartnerLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchPartnerLinksRequest + * @throws {Error} If the payload is not a 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.SearchPartnerLinksRequest; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchPartnerLinksRequest + * @throws {Error} If the payload is 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.SearchPartnerLinksRequest; + + /** + * Verifies a SearchPartnerLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchPartnerLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksRequest; + + /** + * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. + * @param message SearchPartnerLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchPartnerLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchPartnerLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchPartnerLinksResponse. */ + interface ISearchPartnerLinksResponse { + + /** SearchPartnerLinksResponse partnerLinks */ + partnerLinks?: (google.ads.datamanager.v1.IPartnerLink[]|null); + + /** SearchPartnerLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchPartnerLinksResponse. */ + class SearchPartnerLinksResponse implements ISearchPartnerLinksResponse { + + /** + * Constructs a new SearchPartnerLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse); + + /** SearchPartnerLinksResponse partnerLinks. */ + public partnerLinks: google.ads.datamanager.v1.IPartnerLink[]; + + /** SearchPartnerLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchPartnerLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchPartnerLinksResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse): google.ads.datamanager.v1.SearchPartnerLinksResponse; + + /** + * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @param message SearchPartnerLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @param message SearchPartnerLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchPartnerLinksResponse + * @throws {Error} If the payload is not a 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.SearchPartnerLinksResponse; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchPartnerLinksResponse + * @throws {Error} If the payload is 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.SearchPartnerLinksResponse; + + /** + * Verifies a SearchPartnerLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchPartnerLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksResponse; + + /** + * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. + * @param message SearchPartnerLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchPartnerLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchPartnerLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartnerLink. */ + interface IPartnerLink { + + /** PartnerLink name */ + name?: (string|null); + + /** PartnerLink partnerLinkId */ + partnerLinkId?: (string|null); + + /** PartnerLink owningAccount */ + owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** PartnerLink partnerAccount */ + partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); + } + + /** Represents a PartnerLink. */ + class PartnerLink implements IPartnerLink { + + /** + * Constructs a new PartnerLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPartnerLink); + + /** PartnerLink name. */ + public name: string; + + /** PartnerLink partnerLinkId. */ + public partnerLinkId: string; + + /** PartnerLink owningAccount. */ + public owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** PartnerLink partnerAccount. */ + public partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** + * Creates a new PartnerLink instance using the specified properties. + * @param [properties] Properties to set + * @returns PartnerLink instance + */ + public static create(properties?: google.ads.datamanager.v1.IPartnerLink): google.ads.datamanager.v1.PartnerLink; + + /** + * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @param message PartnerLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @param message PartnerLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartnerLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartnerLink + * @throws {Error} If the payload is not a 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.PartnerLink; + + /** + * Decodes a PartnerLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartnerLink + * @throws {Error} If the payload is 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.PartnerLink; + + /** + * Verifies a PartnerLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartnerLink + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerLink; + + /** + * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. + * @param message PartnerLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PartnerLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartnerLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartnerLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserList. */ + interface IUserList { + + /** UserList name */ + name?: (string|null); + + /** UserList id */ + id?: (number|Long|string|null); + + /** UserList readOnly */ + readOnly?: (boolean|null); + + /** UserList displayName */ + displayName?: (string|null); + + /** UserList description */ + description?: (string|null); + + /** UserList membershipStatus */ + membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); + + /** UserList integrationCode */ + integrationCode?: (string|null); + + /** UserList membershipDuration */ + membershipDuration?: (google.protobuf.IDuration|null); + + /** UserList closingReason */ + closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); + + /** UserList accessReason */ + accessReason?: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason|null); + + /** UserList accountAccessStatus */ + accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); + + /** UserList sizeInfo */ + sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); + + /** UserList targetNetworkInfo */ + targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); + + /** UserList ingestedUserListInfo */ + ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); + } + + /** Represents a UserList. */ + class UserList implements IUserList { + + /** + * Constructs a new UserList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserList); + + /** UserList name. */ + public name: string; + + /** UserList id. */ + public id: (number|Long|string); + + /** UserList readOnly. */ + public readOnly: boolean; + + /** UserList displayName. */ + public displayName?: (string|null); + + /** UserList description. */ + public description?: (string|null); + + /** UserList membershipStatus. */ + public membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); + + /** UserList integrationCode. */ + public integrationCode?: (string|null); + + /** UserList membershipDuration. */ + public membershipDuration?: (google.protobuf.IDuration|null); + + /** UserList closingReason. */ + public closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); + + /** UserList accessReason. */ + public accessReason: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason); + + /** UserList accountAccessStatus. */ + public accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); + + /** UserList sizeInfo. */ + public sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); + + /** UserList targetNetworkInfo. */ + public targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); + + /** UserList ingestedUserListInfo. */ + public ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); + + /** UserList userListInfo. */ + public userListInfo?: "ingestedUserListInfo"; + + /** + * Creates a new UserList instance using the specified properties. + * @param [properties] Properties to set + * @returns UserList instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserList): google.ads.datamanager.v1.UserList; + + /** + * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @param message UserList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @param message UserList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserList + * @throws {Error} If the payload is not a 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.UserList; + + /** + * Decodes a UserList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserList + * @throws {Error} If the payload is 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.UserList; + + /** + * Verifies a UserList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserList + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserList; + + /** + * Creates a plain object from a UserList message. Also converts values to other types if specified. + * @param message UserList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserList { + + /** MembershipStatus enum. */ + enum MembershipStatus { + MEMBERSHIP_STATUS_UNSPECIFIED = 0, + OPEN = 1, + CLOSED = 2 + } + + /** ClosingReason enum. */ + enum ClosingReason { + CLOSING_REASON_UNSPECIFIED = 0, + UNUSED = 1 + } + + /** AccessReason enum. */ + enum AccessReason { + ACCESS_REASON_UNSPECIFIED = 0, + OWNED = 1, + SHARED = 2, + LICENSED = 3, + SUBSCRIBED = 4, + AFFILIATED = 5 + } + + /** AccessStatus enum. */ + enum AccessStatus { + ACCESS_STATUS_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } + + /** Properties of a SizeInfo. */ + interface ISizeInfo { + + /** SizeInfo displayNetworkMembersCount */ + displayNetworkMembersCount?: (number|Long|string|null); + + /** SizeInfo searchNetworkMembersCount */ + searchNetworkMembersCount?: (number|Long|string|null); + } + + /** Represents a SizeInfo. */ + class SizeInfo implements ISizeInfo { + + /** + * Constructs a new SizeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISizeInfo); + + /** SizeInfo displayNetworkMembersCount. */ + public displayNetworkMembersCount: (number|Long|string); + + /** SizeInfo searchNetworkMembersCount. */ + public searchNetworkMembersCount: (number|Long|string); + + /** + * Creates a new SizeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SizeInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.ISizeInfo): google.ads.datamanager.v1.SizeInfo; + + /** + * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @param message SizeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @param message SizeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SizeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SizeInfo + * @throws {Error} If the payload is not a 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.SizeInfo; + + /** + * Decodes a SizeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SizeInfo + * @throws {Error} If the payload is 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.SizeInfo; + + /** + * Verifies a SizeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SizeInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SizeInfo; + + /** + * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. + * @param message SizeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SizeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SizeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SizeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetNetworkInfo. */ + interface ITargetNetworkInfo { + + /** TargetNetworkInfo eligibleForDisplay */ + eligibleForDisplay?: (boolean|null); + + /** TargetNetworkInfo eligibleForSearch */ + eligibleForSearch?: (boolean|null); + } + + /** Represents a TargetNetworkInfo. */ + class TargetNetworkInfo implements ITargetNetworkInfo { + + /** + * Constructs a new TargetNetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ITargetNetworkInfo); + + /** TargetNetworkInfo eligibleForDisplay. */ + public eligibleForDisplay: boolean; + + /** TargetNetworkInfo eligibleForSearch. */ + public eligibleForSearch?: (boolean|null); + + /** + * Creates a new TargetNetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetNetworkInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.ITargetNetworkInfo): google.ads.datamanager.v1.TargetNetworkInfo; + + /** + * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @param message TargetNetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @param message TargetNetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetNetworkInfo + * @throws {Error} If the payload is not a 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.TargetNetworkInfo; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetNetworkInfo + * @throws {Error} If the payload is 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.TargetNetworkInfo; + + /** + * Verifies a TargetNetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetNetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.TargetNetworkInfo; + + /** + * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. + * @param message TargetNetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.TargetNetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetNetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetNetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestedUserListInfo. */ + interface IIngestedUserListInfo { + + /** IngestedUserListInfo uploadKeyTypes */ + uploadKeyTypes?: (google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]|null); + + /** IngestedUserListInfo contactIdInfo */ + contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); + + /** IngestedUserListInfo mobileIdInfo */ + mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); + + /** IngestedUserListInfo userIdInfo */ + userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); + + /** IngestedUserListInfo pairIdInfo */ + pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); + + /** IngestedUserListInfo pseudonymousIdInfo */ + pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); + + /** IngestedUserListInfo partnerAudienceInfo */ + partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); + } + + /** Represents an IngestedUserListInfo. */ + class IngestedUserListInfo implements IIngestedUserListInfo { + + /** + * Constructs a new IngestedUserListInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestedUserListInfo); + + /** IngestedUserListInfo uploadKeyTypes. */ + public uploadKeyTypes: google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]; + + /** IngestedUserListInfo contactIdInfo. */ + public contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); + + /** IngestedUserListInfo mobileIdInfo. */ + public mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); + + /** IngestedUserListInfo userIdInfo. */ + public userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); + + /** IngestedUserListInfo pairIdInfo. */ + public pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); + + /** IngestedUserListInfo pseudonymousIdInfo. */ + public pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); + + /** IngestedUserListInfo partnerAudienceInfo. */ + public partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); + + /** + * Creates a new IngestedUserListInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestedUserListInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestedUserListInfo): google.ads.datamanager.v1.IngestedUserListInfo; + + /** + * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @param message IngestedUserListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @param message IngestedUserListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestedUserListInfo + * @throws {Error} If the payload is not a 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.IngestedUserListInfo; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestedUserListInfo + * @throws {Error} If the payload is 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.IngestedUserListInfo; + + /** + * Verifies an IngestedUserListInfo message. + * @param message Plain 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 IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestedUserListInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestedUserListInfo; + + /** + * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. + * @param message IngestedUserListInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestedUserListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestedUserListInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestedUserListInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IngestedUserListInfo { + + /** UploadKeyType enum. */ + enum UploadKeyType { + UPLOAD_KEY_TYPE_UNSPECIFIED = 0, + CONTACT_ID = 1, + MOBILE_ID = 2, + USER_ID = 3, + PAIR_ID = 4, + PSEUDONYMOUS_ID = 5 + } + } + + /** Properties of a ContactIdInfo. */ + interface IContactIdInfo { + + /** ContactIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** ContactIdInfo matchRatePercentage */ + matchRatePercentage?: (number|null); + } + + /** Represents a ContactIdInfo. */ + class ContactIdInfo implements IContactIdInfo { + + /** + * Constructs a new ContactIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IContactIdInfo); + + /** ContactIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** ContactIdInfo matchRatePercentage. */ + public matchRatePercentage: number; + + /** + * Creates a new ContactIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IContactIdInfo): google.ads.datamanager.v1.ContactIdInfo; + + /** + * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @param message ContactIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @param message ContactIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactIdInfo + * @throws {Error} If the payload is not a 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.ContactIdInfo; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactIdInfo + * @throws {Error} If the payload is 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.ContactIdInfo; + + /** + * Verifies a ContactIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ContactIdInfo; + + /** + * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. + * @param message ContactIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ContactIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileIdInfo. */ + interface IMobileIdInfo { + + /** MobileIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** MobileIdInfo keySpace */ + keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); + + /** MobileIdInfo appId */ + appId?: (string|null); + } + + /** Represents a MobileIdInfo. */ + class MobileIdInfo implements IMobileIdInfo { + + /** + * Constructs a new MobileIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IMobileIdInfo); + + /** MobileIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** MobileIdInfo keySpace. */ + public keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); + + /** MobileIdInfo appId. */ + public appId?: (string|null); + + /** + * Creates a new MobileIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IMobileIdInfo): google.ads.datamanager.v1.MobileIdInfo; + + /** + * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @param message MobileIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @param message MobileIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileIdInfo + * @throws {Error} If the payload is not a 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.MobileIdInfo; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileIdInfo + * @throws {Error} If the payload is 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.MobileIdInfo; + + /** + * Verifies a MobileIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.MobileIdInfo; + + /** + * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. + * @param message MobileIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.MobileIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MobileIdInfo { + + /** KeySpace enum. */ + enum KeySpace { + KEY_SPACE_UNSPECIFIED = 0, + IOS = 1, + ANDROID = 2 + } + } + + /** Properties of a UserIdInfo. */ + interface IUserIdInfo { + + /** UserIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + } + + /** Represents a UserIdInfo. */ + class UserIdInfo implements IUserIdInfo { + + /** + * Constructs a new UserIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserIdInfo); + + /** UserIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** + * Creates a new UserIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UserIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserIdInfo): google.ads.datamanager.v1.UserIdInfo; + + /** + * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @param message UserIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @param message UserIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserIdInfo + * @throws {Error} If the payload is not a 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.UserIdInfo; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserIdInfo + * @throws {Error} If the payload is 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.UserIdInfo; + + /** + * Verifies a UserIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdInfo; + + /** + * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. + * @param message UserIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairIdInfo. */ + interface IPairIdInfo { + + /** PairIdInfo publisherId */ + publisherId?: (number|Long|string|null); + + /** PairIdInfo publisherName */ + publisherName?: (string|null); + + /** PairIdInfo matchRatePercentage */ + matchRatePercentage?: (number|null); + + /** PairIdInfo advertiserIdentifierCount */ + advertiserIdentifierCount?: (number|Long|string|null); + + /** PairIdInfo cleanRoomIdentifier */ + cleanRoomIdentifier?: (string|null); + } + + /** Represents a PairIdInfo. */ + class PairIdInfo implements IPairIdInfo { + + /** + * Constructs a new PairIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPairIdInfo); + + /** PairIdInfo publisherId. */ + public publisherId?: (number|Long|string|null); + + /** PairIdInfo publisherName. */ + public publisherName?: (string|null); + + /** PairIdInfo matchRatePercentage. */ + public matchRatePercentage: number; + + /** PairIdInfo advertiserIdentifierCount. */ + public advertiserIdentifierCount: (number|Long|string); + + /** PairIdInfo cleanRoomIdentifier. */ + public cleanRoomIdentifier?: (string|null); + + /** + * Creates a new PairIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PairIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPairIdInfo): google.ads.datamanager.v1.PairIdInfo; + + /** + * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @param message PairIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @param message PairIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairIdInfo + * @throws {Error} If the payload is not a 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.PairIdInfo; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairIdInfo + * @throws {Error} If the payload is 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.PairIdInfo; + + /** + * Verifies a PairIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PairIdInfo; + + /** + * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. + * @param message PairIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PairIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartnerAudienceInfo. */ + interface IPartnerAudienceInfo { + + /** PartnerAudienceInfo partnerAudienceSource */ + partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); + + /** PartnerAudienceInfo commercePartner */ + commercePartner?: (string|null); + } + + /** Represents a PartnerAudienceInfo. */ + class PartnerAudienceInfo implements IPartnerAudienceInfo { + + /** + * Constructs a new PartnerAudienceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo); + + /** PartnerAudienceInfo partnerAudienceSource. */ + public partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); + + /** PartnerAudienceInfo commercePartner. */ + public commercePartner?: (string|null); + + /** + * Creates a new PartnerAudienceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PartnerAudienceInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo): google.ads.datamanager.v1.PartnerAudienceInfo; + + /** + * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @param message PartnerAudienceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @param message PartnerAudienceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartnerAudienceInfo + * @throws {Error} If the payload is not a 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.PartnerAudienceInfo; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartnerAudienceInfo + * @throws {Error} If the payload is 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.PartnerAudienceInfo; + + /** + * Verifies a PartnerAudienceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartnerAudienceInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerAudienceInfo; + + /** + * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. + * @param message PartnerAudienceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PartnerAudienceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartnerAudienceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartnerAudienceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PartnerAudienceInfo { + + /** PartnerAudienceSource enum. */ + enum PartnerAudienceSource { + PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0, + COMMERCE_AUDIENCE = 1, + LINEAR_TV_AUDIENCE = 2, + AGENCY_PROVIDER_AUDIENCE = 3 + } + } + + /** Properties of a PseudonymousIdInfo. */ + interface IPseudonymousIdInfo { + + /** PseudonymousIdInfo syncStatus */ + syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); + + /** PseudonymousIdInfo billableRecordCount */ + billableRecordCount?: (number|Long|string|null); + } + + /** Represents a PseudonymousIdInfo. */ + class PseudonymousIdInfo implements IPseudonymousIdInfo { + + /** + * Constructs a new PseudonymousIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo); + + /** PseudonymousIdInfo syncStatus. */ + public syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); + + /** PseudonymousIdInfo billableRecordCount. */ + public billableRecordCount?: (number|Long|string|null); + + /** + * Creates a new PseudonymousIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PseudonymousIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo): google.ads.datamanager.v1.PseudonymousIdInfo; + + /** + * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @param message PseudonymousIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @param message PseudonymousIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PseudonymousIdInfo + * @throws {Error} If the payload is not a 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.PseudonymousIdInfo; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PseudonymousIdInfo + * @throws {Error} If the payload is 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.PseudonymousIdInfo; + + /** + * Verifies a PseudonymousIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PseudonymousIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PseudonymousIdInfo; + + /** + * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. + * @param message PseudonymousIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PseudonymousIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PseudonymousIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PseudonymousIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PseudonymousIdInfo { + + /** SyncStatus enum. */ + enum SyncStatus { + SYNC_STATUS_UNSPECIFIED = 0, + CREATED = 1, + READY_FOR_USE = 2, + FAILED = 3 + } + } + + /** DataSourceType enum. */ + enum DataSourceType { + DATA_SOURCE_TYPE_UNSPECIFIED = 0, + DATA_SOURCE_TYPE_FIRST_PARTY = 1, + DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU = 2, + DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE = 3, + DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA = 4 + } + + /** Properties of a UserListDirectLicense. */ + interface IUserListDirectLicense { + + /** UserListDirectLicense name */ + name?: (string|null); + + /** UserListDirectLicense userListId */ + userListId?: (number|Long|string|null); + + /** UserListDirectLicense userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListDirectLicense clientAccountType */ + clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListDirectLicense clientAccountId */ + clientAccountId?: (number|Long|string|null); + + /** UserListDirectLicense clientAccountDisplayName */ + clientAccountDisplayName?: (string|null); + + /** UserListDirectLicense status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListDirectLicense pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListDirectLicense historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListDirectLicense metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListDirectLicense. */ + class UserListDirectLicense implements IUserListDirectLicense { + + /** + * Constructs a new UserListDirectLicense. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListDirectLicense); + + /** UserListDirectLicense name. */ + public name: string; + + /** UserListDirectLicense userListId. */ + public userListId?: (number|Long|string|null); + + /** UserListDirectLicense userListDisplayName. */ + public userListDisplayName: string; + + /** UserListDirectLicense clientAccountType. */ + public clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListDirectLicense clientAccountId. */ + public clientAccountId?: (number|Long|string|null); + + /** UserListDirectLicense clientAccountDisplayName. */ + public clientAccountDisplayName: string; + + /** UserListDirectLicense status. */ + public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListDirectLicense pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListDirectLicense historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListDirectLicense metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListDirectLicense instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListDirectLicense instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListDirectLicense): google.ads.datamanager.v1.UserListDirectLicense; + + /** + * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @param message UserListDirectLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @param message UserListDirectLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListDirectLicense + * @throws {Error} If the payload is not a 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.UserListDirectLicense; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListDirectLicense + * @throws {Error} If the payload is 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.UserListDirectLicense; + + /** + * Verifies a UserListDirectLicense message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListDirectLicense + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListDirectLicense; + + /** + * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. + * @param message UserListDirectLicense + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListDirectLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListDirectLicense to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListDirectLicense + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserListLicenseClientAccountType enum. */ + enum UserListLicenseClientAccountType { + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN = 0, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS = 1, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER = 2, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER = 3, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK = 4 + } + + /** Properties of a UserListLicenseMetrics. */ + interface IUserListLicenseMetrics { + + /** UserListLicenseMetrics clickCount */ + clickCount?: (number|Long|string|null); + + /** UserListLicenseMetrics impressionCount */ + impressionCount?: (number|Long|string|null); + + /** UserListLicenseMetrics revenueUsdMicros */ + revenueUsdMicros?: (number|Long|string|null); + + /** UserListLicenseMetrics startDate */ + startDate?: (number|Long|string|null); + + /** UserListLicenseMetrics endDate */ + endDate?: (number|Long|string|null); + } + + /** Represents a UserListLicenseMetrics. */ + class UserListLicenseMetrics implements IUserListLicenseMetrics { + + /** + * Constructs a new UserListLicenseMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics); + + /** UserListLicenseMetrics clickCount. */ + public clickCount: (number|Long|string); + + /** UserListLicenseMetrics impressionCount. */ + public impressionCount: (number|Long|string); + + /** UserListLicenseMetrics revenueUsdMicros. */ + public revenueUsdMicros: (number|Long|string); + + /** UserListLicenseMetrics startDate. */ + public startDate: (number|Long|string); + + /** UserListLicenseMetrics endDate. */ + public endDate: (number|Long|string); + + /** + * Creates a new UserListLicenseMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListLicenseMetrics instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics): google.ads.datamanager.v1.UserListLicenseMetrics; + + /** + * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @param message UserListLicenseMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @param message UserListLicenseMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListLicenseMetrics + * @throws {Error} If the payload is not a 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.UserListLicenseMetrics; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListLicenseMetrics + * @throws {Error} If the payload is 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.UserListLicenseMetrics; + + /** + * Verifies a UserListLicenseMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListLicenseMetrics + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicenseMetrics; + + /** + * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. + * @param message UserListLicenseMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListLicenseMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListLicenseMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListLicenseMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListLicensePricing. */ + interface IUserListLicensePricing { + + /** UserListLicensePricing pricingId */ + pricingId?: (number|Long|string|null); + + /** UserListLicensePricing costMicros */ + costMicros?: (number|Long|string|null); + + /** UserListLicensePricing currencyCode */ + currencyCode?: (string|null); + + /** UserListLicensePricing startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing pricingActive */ + pricingActive?: (boolean|null); + + /** UserListLicensePricing buyerApprovalState */ + buyerApprovalState?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null); + + /** UserListLicensePricing costType */ + costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); + + /** UserListLicensePricing maxCostMicros */ + maxCostMicros?: (number|Long|string|null); + } + + /** Represents a UserListLicensePricing. */ + class UserListLicensePricing implements IUserListLicensePricing { + + /** + * Constructs a new UserListLicensePricing. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListLicensePricing); + + /** UserListLicensePricing pricingId. */ + public pricingId: (number|Long|string); + + /** UserListLicensePricing costMicros. */ + public costMicros?: (number|Long|string|null); + + /** UserListLicensePricing currencyCode. */ + public currencyCode?: (string|null); + + /** UserListLicensePricing startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing pricingActive. */ + public pricingActive: boolean; + + /** UserListLicensePricing buyerApprovalState. */ + public buyerApprovalState: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState); + + /** UserListLicensePricing costType. */ + public costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); + + /** UserListLicensePricing maxCostMicros. */ + public maxCostMicros?: (number|Long|string|null); + + /** + * Creates a new UserListLicensePricing instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListLicensePricing instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListLicensePricing): google.ads.datamanager.v1.UserListLicensePricing; + + /** + * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @param message UserListLicensePricing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @param message UserListLicensePricing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListLicensePricing + * @throws {Error} If the payload is not a 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.UserListLicensePricing; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListLicensePricing + * @throws {Error} If the payload is 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.UserListLicensePricing; + + /** + * Verifies a UserListLicensePricing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListLicensePricing + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicensePricing; + + /** + * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. + * @param message UserListLicensePricing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListLicensePricing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListLicensePricing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListLicensePricing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserListLicensePricing { + + /** UserListPricingBuyerApprovalState enum. */ + enum UserListPricingBuyerApprovalState { + USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED = 0, + PENDING = 1, + APPROVED = 2, + REJECTED = 3 + } + + /** UserListPricingCostType enum. */ + enum UserListPricingCostType { + USER_LIST_PRICING_COST_TYPE_UNSPECIFIED = 0, + CPC = 1, + CPM = 2, + MEDIA_SHARE = 3 + } + } + + /** UserListLicenseStatus enum. */ + enum UserListLicenseStatus { + USER_LIST_LICENSE_STATUS_UNSPECIFIED = 0, + USER_LIST_LICENSE_STATUS_ENABLED = 1, + USER_LIST_LICENSE_STATUS_DISABLED = 2 + } + + /** Represents a UserListDirectLicenseService */ + class UserListDirectLicenseService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListDirectLicenseService 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 UserListDirectLicenseService 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): UserListDirectLicenseService; + + /** + * Calls CreateUserListDirectLicense. + * @param request CreateUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback): void; + + /** + * Calls CreateUserListDirectLicense. + * @param request CreateUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): Promise; + + /** + * Calls GetUserListDirectLicense. + * @param request GetUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback): void; + + /** + * Calls GetUserListDirectLicense. + * @param request GetUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): Promise; + + /** + * Calls UpdateUserListDirectLicense. + * @param request UpdateUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback): void; + + /** + * Calls UpdateUserListDirectLicense. + * @param request UpdateUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): Promise; + + /** + * Calls ListUserListDirectLicenses. + * @param request ListUserListDirectLicensesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse + */ + public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback): void; + + /** + * Calls ListUserListDirectLicenses. + * @param request ListUserListDirectLicensesRequest message or plain object + * @returns Promise + */ + public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): Promise; + } + + namespace UserListDirectLicenseService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type CreateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type GetUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type UpdateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. + * @param error Error, if any + * @param [response] ListUserListDirectLicensesResponse + */ + type ListUserListDirectLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListDirectLicensesResponse) => void; + } + + /** Properties of a CreateUserListDirectLicenseRequest. */ + interface ICreateUserListDirectLicenseRequest { + + /** CreateUserListDirectLicenseRequest parent */ + parent?: (string|null); + + /** CreateUserListDirectLicenseRequest userListDirectLicense */ + userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + } + + /** Represents a CreateUserListDirectLicenseRequest. */ + class CreateUserListDirectLicenseRequest implements ICreateUserListDirectLicenseRequest { + + /** + * Constructs a new CreateUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest); + + /** CreateUserListDirectLicenseRequest parent. */ + public parent: string; + + /** CreateUserListDirectLicenseRequest userListDirectLicense. */ + public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** + * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @param message CreateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @param message CreateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.CreateUserListDirectLicenseRequest; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.CreateUserListDirectLicenseRequest; + + /** + * Verifies a CreateUserListDirectLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; + + /** + * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message CreateUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserListDirectLicenseRequest. */ + interface IGetUserListDirectLicenseRequest { + + /** GetUserListDirectLicenseRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListDirectLicenseRequest. */ + class GetUserListDirectLicenseRequest implements IGetUserListDirectLicenseRequest { + + /** + * Constructs a new GetUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest); + + /** GetUserListDirectLicenseRequest name. */ + public name: string; + + /** + * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @param message GetUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @param message GetUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.GetUserListDirectLicenseRequest; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.GetUserListDirectLicenseRequest; + + /** + * Verifies a GetUserListDirectLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; + + /** + * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message GetUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserListDirectLicenseRequest. */ + interface IUpdateUserListDirectLicenseRequest { + + /** UpdateUserListDirectLicenseRequest userListDirectLicense */ + userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** UpdateUserListDirectLicenseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateUserListDirectLicenseRequest. */ + class UpdateUserListDirectLicenseRequest implements IUpdateUserListDirectLicenseRequest { + + /** + * Constructs a new UpdateUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest); + + /** UpdateUserListDirectLicenseRequest userListDirectLicense. */ + public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** UpdateUserListDirectLicenseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @param message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @param message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.UpdateUserListDirectLicenseRequest; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.UpdateUserListDirectLicenseRequest; + + /** + * Verifies an UpdateUserListDirectLicenseRequest message. + * @param message Plain 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; + + /** + * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message UpdateUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListDirectLicensesRequest. */ + interface IListUserListDirectLicensesRequest { + + /** ListUserListDirectLicensesRequest parent */ + parent?: (string|null); + + /** ListUserListDirectLicensesRequest filter */ + filter?: (string|null); + + /** ListUserListDirectLicensesRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListDirectLicensesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListDirectLicensesRequest. */ + class ListUserListDirectLicensesRequest implements IListUserListDirectLicensesRequest { + + /** + * Constructs a new ListUserListDirectLicensesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest); + + /** ListUserListDirectLicensesRequest parent. */ + public parent: string; + + /** ListUserListDirectLicensesRequest filter. */ + public filter: string; + + /** ListUserListDirectLicensesRequest pageSize. */ + public pageSize: number; + + /** ListUserListDirectLicensesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListDirectLicensesRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @param message ListUserListDirectLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @param message ListUserListDirectLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesRequest; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListDirectLicensesRequest + * @throws {Error} If the payload is 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.ListUserListDirectLicensesRequest; + + /** + * Verifies a ListUserListDirectLicensesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListDirectLicensesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; + + /** + * Creates a plain object from a ListUserListDirectLicensesRequest message. Also converts values to other types if specified. + * @param message ListUserListDirectLicensesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListDirectLicensesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListDirectLicensesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListDirectLicensesResponse. */ + interface IListUserListDirectLicensesResponse { + + /** ListUserListDirectLicensesResponse userListDirectLicenses */ + userListDirectLicenses?: (google.ads.datamanager.v1.IUserListDirectLicense[]|null); + + /** ListUserListDirectLicensesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListDirectLicensesResponse. */ + class ListUserListDirectLicensesResponse implements IListUserListDirectLicensesResponse { + + /** + * Constructs a new ListUserListDirectLicensesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse); + + /** ListUserListDirectLicensesResponse userListDirectLicenses. */ + public userListDirectLicenses: google.ads.datamanager.v1.IUserListDirectLicense[]; + + /** ListUserListDirectLicensesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListDirectLicensesResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @param message ListUserListDirectLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @param message ListUserListDirectLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesResponse; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListDirectLicensesResponse + * @throws {Error} If the payload is 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.ListUserListDirectLicensesResponse; + + /** + * Verifies a ListUserListDirectLicensesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListDirectLicensesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; + + /** + * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. + * @param message ListUserListDirectLicensesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListDirectLicensesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListDirectLicensesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListGlobalLicense. */ + interface IUserListGlobalLicense { + + /** UserListGlobalLicense name */ + name?: (string|null); + + /** UserListGlobalLicense userListId */ + userListId?: (number|Long|string|null); + + /** UserListGlobalLicense userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListGlobalLicense licenseType */ + licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicense status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicense pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicense historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListGlobalLicense metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListGlobalLicense. */ + class UserListGlobalLicense implements IUserListGlobalLicense { + + /** + * Constructs a new UserListGlobalLicense. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicense); + + /** UserListGlobalLicense name. */ + public name: string; + + /** UserListGlobalLicense userListId. */ + public userListId?: (number|Long|string|null); + + /** UserListGlobalLicense userListDisplayName. */ + public userListDisplayName: string; + + /** UserListGlobalLicense licenseType. */ + public licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicense status. */ + public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicense pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicense historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListGlobalLicense metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListGlobalLicense instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListGlobalLicense instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicense): google.ads.datamanager.v1.UserListGlobalLicense; + + /** + * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @param message UserListGlobalLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @param message UserListGlobalLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListGlobalLicense + * @throws {Error} If the payload is not a 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.UserListGlobalLicense; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListGlobalLicense + * @throws {Error} If the payload is 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.UserListGlobalLicense; + + /** + * Verifies a UserListGlobalLicense message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListGlobalLicense + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicense; + + /** + * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. + * @param message UserListGlobalLicense + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListGlobalLicense to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListGlobalLicense + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListGlobalLicenseCustomerInfo. */ + interface IUserListGlobalLicenseCustomerInfo { + + /** UserListGlobalLicenseCustomerInfo name */ + name?: (string|null); + + /** UserListGlobalLicenseCustomerInfo userListId */ + userListId?: (number|Long|string|null); + + /** UserListGlobalLicenseCustomerInfo userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListGlobalLicenseCustomerInfo licenseType */ + licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicenseCustomerInfo status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicenseCustomerInfo pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountType */ + clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountId */ + clientAccountId?: (number|Long|string|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName */ + clientAccountDisplayName?: (string|null); + + /** UserListGlobalLicenseCustomerInfo historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListGlobalLicenseCustomerInfo metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListGlobalLicenseCustomerInfo. */ + class UserListGlobalLicenseCustomerInfo implements IUserListGlobalLicenseCustomerInfo { + + /** + * Constructs a new UserListGlobalLicenseCustomerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo); + + /** UserListGlobalLicenseCustomerInfo name. */ + public name: string; + + /** UserListGlobalLicenseCustomerInfo userListId. */ + public userListId: (number|Long|string); + + /** UserListGlobalLicenseCustomerInfo userListDisplayName. */ + public userListDisplayName: string; + + /** UserListGlobalLicenseCustomerInfo licenseType. */ + public licenseType: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType); + + /** UserListGlobalLicenseCustomerInfo status. */ + public status: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus); + + /** UserListGlobalLicenseCustomerInfo pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountType. */ + public clientAccountType: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType); + + /** UserListGlobalLicenseCustomerInfo clientAccountId. */ + public clientAccountId: (number|Long|string); + + /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName. */ + public clientAccountDisplayName: string; + + /** UserListGlobalLicenseCustomerInfo historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListGlobalLicenseCustomerInfo metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListGlobalLicenseCustomerInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a 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.UserListGlobalLicenseCustomerInfo; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is 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.UserListGlobalLicenseCustomerInfo; + + /** + * Verifies a UserListGlobalLicenseCustomerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListGlobalLicenseCustomerInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; + + /** + * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. + * @param message UserListGlobalLicenseCustomerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListGlobalLicenseCustomerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListGlobalLicenseCustomerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserListGlobalLicenseType enum. */ + enum UserListGlobalLicenseType { + USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED = 0, + USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER = 1, + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE = 2, + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE = 3 + } + + /** Represents a UserListGlobalLicenseService */ + class UserListGlobalLicenseService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListGlobalLicenseService 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 UserListGlobalLicenseService 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): UserListGlobalLicenseService; + + /** + * Calls CreateUserListGlobalLicense. + * @param request CreateUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback): void; + + /** + * Calls CreateUserListGlobalLicense. + * @param request CreateUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): Promise; + + /** + * Calls UpdateUserListGlobalLicense. + * @param request UpdateUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback): void; + + /** + * Calls UpdateUserListGlobalLicense. + * @param request UpdateUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): Promise; + + /** + * Calls GetUserListGlobalLicense. + * @param request GetUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback): void; + + /** + * Calls GetUserListGlobalLicense. + * @param request GetUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): Promise; + + /** + * Calls ListUserListGlobalLicenses. + * @param request ListUserListGlobalLicensesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse + */ + public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback): void; + + /** + * Calls ListUserListGlobalLicenses. + * @param request ListUserListGlobalLicensesRequest message or plain object + * @returns Promise + */ + public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): Promise; + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse + */ + public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback): void; + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @returns Promise + */ + public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): Promise; + } + + namespace UserListGlobalLicenseService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type CreateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type UpdateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type GetUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. + * @param error Error, if any + * @param [response] ListUserListGlobalLicensesResponse + */ + type ListUserListGlobalLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. + * @param error Error, if any + * @param [response] ListUserListGlobalLicenseCustomerInfosResponse + */ + type ListUserListGlobalLicenseCustomerInfosCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) => void; + } + + /** Properties of a CreateUserListGlobalLicenseRequest. */ + interface ICreateUserListGlobalLicenseRequest { + + /** CreateUserListGlobalLicenseRequest parent */ + parent?: (string|null); + + /** CreateUserListGlobalLicenseRequest userListGlobalLicense */ + userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + } + + /** Represents a CreateUserListGlobalLicenseRequest. */ + class CreateUserListGlobalLicenseRequest implements ICreateUserListGlobalLicenseRequest { + + /** + * Constructs a new CreateUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest); + + /** CreateUserListGlobalLicenseRequest parent. */ + public parent: string; + + /** CreateUserListGlobalLicenseRequest userListGlobalLicense. */ + public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** + * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.CreateUserListGlobalLicenseRequest; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.CreateUserListGlobalLicenseRequest; + + /** + * Verifies a CreateUserListGlobalLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; + + /** + * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message CreateUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserListGlobalLicenseRequest. */ + interface IUpdateUserListGlobalLicenseRequest { + + /** UpdateUserListGlobalLicenseRequest userListGlobalLicense */ + userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** UpdateUserListGlobalLicenseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateUserListGlobalLicenseRequest. */ + class UpdateUserListGlobalLicenseRequest implements IUpdateUserListGlobalLicenseRequest { + + /** + * Constructs a new UpdateUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest); + + /** UpdateUserListGlobalLicenseRequest userListGlobalLicense. */ + public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** UpdateUserListGlobalLicenseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.UpdateUserListGlobalLicenseRequest; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.UpdateUserListGlobalLicenseRequest; + + /** + * Verifies an UpdateUserListGlobalLicenseRequest message. + * @param message Plain 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; + + /** + * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message UpdateUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserListGlobalLicenseRequest. */ + interface IGetUserListGlobalLicenseRequest { + + /** GetUserListGlobalLicenseRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListGlobalLicenseRequest. */ + class GetUserListGlobalLicenseRequest implements IGetUserListGlobalLicenseRequest { + + /** + * Constructs a new GetUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest); + + /** GetUserListGlobalLicenseRequest name. */ + public name: string; + + /** + * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @param message GetUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @param message GetUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.GetUserListGlobalLicenseRequest; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.GetUserListGlobalLicenseRequest; + + /** + * Verifies a GetUserListGlobalLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; + + /** + * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message GetUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicensesRequest. */ + interface IListUserListGlobalLicensesRequest { + + /** ListUserListGlobalLicensesRequest parent */ + parent?: (string|null); + + /** ListUserListGlobalLicensesRequest filter */ + filter?: (string|null); + + /** ListUserListGlobalLicensesRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListGlobalLicensesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicensesRequest. */ + class ListUserListGlobalLicensesRequest implements IListUserListGlobalLicensesRequest { + + /** + * Constructs a new ListUserListGlobalLicensesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest); + + /** ListUserListGlobalLicensesRequest parent. */ + public parent: string; + + /** ListUserListGlobalLicensesRequest filter. */ + public filter: string; + + /** ListUserListGlobalLicensesRequest pageSize. */ + public pageSize: number; + + /** ListUserListGlobalLicensesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicensesRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @param message ListUserListGlobalLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @param message ListUserListGlobalLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesRequest; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is 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.ListUserListGlobalLicensesRequest; + + /** + * Verifies a ListUserListGlobalLicensesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicensesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; + + /** + * Creates a plain object from a ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicensesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicensesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicensesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicensesResponse. */ + interface IListUserListGlobalLicensesResponse { + + /** ListUserListGlobalLicensesResponse userListGlobalLicenses */ + userListGlobalLicenses?: (google.ads.datamanager.v1.IUserListGlobalLicense[]|null); + + /** ListUserListGlobalLicensesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicensesResponse. */ + class ListUserListGlobalLicensesResponse implements IListUserListGlobalLicensesResponse { + + /** + * Constructs a new ListUserListGlobalLicensesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse); + + /** ListUserListGlobalLicensesResponse userListGlobalLicenses. */ + public userListGlobalLicenses: google.ads.datamanager.v1.IUserListGlobalLicense[]; + + /** ListUserListGlobalLicensesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicensesResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @param message ListUserListGlobalLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @param message ListUserListGlobalLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesResponse; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is 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.ListUserListGlobalLicensesResponse; + + /** + * Verifies a ListUserListGlobalLicensesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicensesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; + + /** + * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicensesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicensesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicensesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicenseCustomerInfosRequest. */ + interface IListUserListGlobalLicenseCustomerInfosRequest { + + /** ListUserListGlobalLicenseCustomerInfosRequest parent */ + parent?: (string|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest filter */ + filter?: (string|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicenseCustomerInfosRequest. */ + class ListUserListGlobalLicenseCustomerInfosRequest implements IListUserListGlobalLicenseCustomerInfosRequest { + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest); + + /** ListUserListGlobalLicenseCustomerInfosRequest parent. */ + public parent: string; + + /** ListUserListGlobalLicenseCustomerInfosRequest filter. */ + public filter: string; + + /** ListUserListGlobalLicenseCustomerInfosRequest pageSize. */ + public pageSize: number; + + /** ListUserListGlobalLicenseCustomerInfosRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicenseCustomerInfosRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicenseCustomerInfosRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicenseCustomerInfosRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicenseCustomerInfosResponse. */ + interface IListUserListGlobalLicenseCustomerInfosResponse { + + /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos */ + userListGlobalLicenseCustomerInfos?: (google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]|null); + + /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicenseCustomerInfosResponse. */ + class ListUserListGlobalLicenseCustomerInfosResponse implements IListUserListGlobalLicenseCustomerInfosResponse { + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse); + + /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. */ + public userListGlobalLicenseCustomerInfos: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]; + + /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicenseCustomerInfosResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicenseCustomerInfosResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicenseCustomerInfosResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a UserListService */ + class UserListService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListService 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 UserListService 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): UserListService; + + /** + * Calls GetUserList. + * @param request GetUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest, callback: google.ads.datamanager.v1.UserListService.GetUserListCallback): void; + + /** + * Calls GetUserList. + * @param request GetUserListRequest message or plain object + * @returns Promise + */ + public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest): Promise; + + /** + * Calls ListUserLists. + * @param request ListUserListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListsResponse + */ + public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest, callback: google.ads.datamanager.v1.UserListService.ListUserListsCallback): void; + + /** + * Calls ListUserLists. + * @param request ListUserListsRequest message or plain object + * @returns Promise + */ + public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest): Promise; + + /** + * Calls CreateUserList. + * @param request CreateUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest, callback: google.ads.datamanager.v1.UserListService.CreateUserListCallback): void; + + /** + * Calls CreateUserList. + * @param request CreateUserListRequest message or plain object + * @returns Promise + */ + public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest): Promise; + + /** + * Calls UpdateUserList. + * @param request UpdateUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest, callback: google.ads.datamanager.v1.UserListService.UpdateUserListCallback): void; + + /** + * Calls UpdateUserList. + * @param request UpdateUserListRequest message or plain object + * @returns Promise + */ + public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest): Promise; + + /** + * Calls DeleteUserList. + * @param request DeleteUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest, callback: google.ads.datamanager.v1.UserListService.DeleteUserListCallback): void; + + /** + * Calls DeleteUserList. + * @param request DeleteUserListRequest message or plain object + * @returns Promise + */ + public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest): Promise; + } + + namespace UserListService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type GetUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. + * @param error Error, if any + * @param [response] ListUserListsResponse + */ + type ListUserListsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListsResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type CreateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type UpdateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserListCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a GetUserListRequest. */ + interface IGetUserListRequest { + + /** GetUserListRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListRequest. */ + class GetUserListRequest implements IGetUserListRequest { + + /** + * Constructs a new GetUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListRequest); + + /** GetUserListRequest name. */ + public name: string; + + /** + * Creates a new GetUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListRequest): google.ads.datamanager.v1.GetUserListRequest; + + /** + * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @param message GetUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @param message GetUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListRequest + * @throws {Error} If the payload is not a 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.GetUserListRequest; + + /** + * Decodes a GetUserListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListRequest + * @throws {Error} If the payload is 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.GetUserListRequest; + + /** + * Verifies a GetUserListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListRequest; + + /** + * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. + * @param message GetUserListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListsRequest. */ + interface IListUserListsRequest { + + /** ListUserListsRequest parent */ + parent?: (string|null); + + /** ListUserListsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListsRequest pageToken */ + pageToken?: (string|null); + + /** ListUserListsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListUserListsRequest. */ + class ListUserListsRequest implements IListUserListsRequest { + + /** + * Constructs a new ListUserListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListsRequest); + + /** ListUserListsRequest parent. */ + public parent: string; + + /** ListUserListsRequest pageSize. */ + public pageSize: number; + + /** ListUserListsRequest pageToken. */ + public pageToken: string; + + /** ListUserListsRequest filter. */ + public filter: string; + + /** + * Creates a new ListUserListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListsRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListsRequest): google.ads.datamanager.v1.ListUserListsRequest; + + /** + * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @param message ListUserListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @param message ListUserListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListsRequest + * @throws {Error} If the payload is not a 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.ListUserListsRequest; + + /** + * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListsRequest + * @throws {Error} If the payload is 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.ListUserListsRequest; + + /** + * Verifies a ListUserListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsRequest; + + /** + * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. + * @param message ListUserListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListsResponse. */ + interface IListUserListsResponse { + + /** ListUserListsResponse userLists */ + userLists?: (google.ads.datamanager.v1.IUserList[]|null); + + /** ListUserListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListsResponse. */ + class ListUserListsResponse implements IListUserListsResponse { + + /** + * Constructs a new ListUserListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListsResponse); + + /** ListUserListsResponse userLists. */ + public userLists: google.ads.datamanager.v1.IUserList[]; + + /** ListUserListsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListsResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListsResponse): google.ads.datamanager.v1.ListUserListsResponse; + + /** + * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @param message ListUserListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @param message ListUserListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListsResponse + * @throws {Error} If the payload is not a 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.ListUserListsResponse; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListsResponse + * @throws {Error} If the payload is 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.ListUserListsResponse; + + /** + * Verifies a ListUserListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsResponse; + + /** + * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. + * @param message ListUserListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserListRequest. */ + interface ICreateUserListRequest { + + /** CreateUserListRequest parent */ + parent?: (string|null); + + /** CreateUserListRequest userList */ + userList?: (google.ads.datamanager.v1.IUserList|null); + + /** CreateUserListRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateUserListRequest. */ + class CreateUserListRequest implements ICreateUserListRequest { + + /** + * Constructs a new CreateUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListRequest); + + /** CreateUserListRequest parent. */ + public parent: string; + + /** CreateUserListRequest userList. */ + public userList?: (google.ads.datamanager.v1.IUserList|null); + + /** CreateUserListRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListRequest): google.ads.datamanager.v1.CreateUserListRequest; + + /** + * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @param message CreateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @param message CreateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListRequest + * @throws {Error} If the payload is not a 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.CreateUserListRequest; + + /** + * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserListRequest + * @throws {Error} If the payload is 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.CreateUserListRequest; + + /** + * Verifies a CreateUserListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserListRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListRequest; + + /** + * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. + * @param message CreateUserListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserListRequest. */ + interface IUpdateUserListRequest { + + /** UpdateUserListRequest userList */ + userList?: (google.ads.datamanager.v1.IUserList|null); + + /** UpdateUserListRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUserListRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateUserListRequest. */ + class UpdateUserListRequest implements IUpdateUserListRequest { + + /** + * Constructs a new UpdateUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListRequest); + + /** UpdateUserListRequest userList. */ + public userList?: (google.ads.datamanager.v1.IUserList|null); + + /** UpdateUserListRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUserListRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListRequest): google.ads.datamanager.v1.UpdateUserListRequest; + + /** + * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @param message UpdateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUpdateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @param message UpdateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserListRequest + * @throws {Error} If the payload is not a 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.UpdateUserListRequest; + + /** + * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserListRequest + * @throws {Error} If the payload is 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.UpdateUserListRequest; + + /** + * Verifies an UpdateUserListRequest message. + * @param message Plain 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 UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserListRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListRequest; + + /** + * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. + * @param message UpdateUserListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UpdateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserListRequest. */ + interface IDeleteUserListRequest { + + /** DeleteUserListRequest name */ + name?: (string|null); + + /** DeleteUserListRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteUserListRequest. */ + class DeleteUserListRequest implements IDeleteUserListRequest { + + /** + * Constructs a new DeleteUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IDeleteUserListRequest); + + /** DeleteUserListRequest name. */ + public name: string; + + /** DeleteUserListRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IDeleteUserListRequest): google.ads.datamanager.v1.DeleteUserListRequest; + + /** + * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @param message DeleteUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IDeleteUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @param message DeleteUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IDeleteUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserListRequest + * @throws {Error} If the payload is not a 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.DeleteUserListRequest; + + /** + * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserListRequest + * @throws {Error} If the payload is 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.DeleteUserListRequest; + + /** + * Verifies a DeleteUserListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserListRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeleteUserListRequest; + + /** + * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. + * @param message DeleteUserListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.DeleteUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** 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 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; + } + + /** 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); + + /** 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); + } + + /** 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; + } + + /** 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 FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/protos/protos.js b/owl-bot-staging/google-ads-datamanager/protos/protos.js new file mode 100644 index 00000000000..0dfae3dfbd5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/protos.js @@ -0,0 +1,48872 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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_ads_datamanager_protos || ($protobuf.roots._google_ads_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 = {}; + + /** + * AgeRange enum. + * @name google.ads.datamanager.v1.AgeRange + * @enum {number} + * @property {number} AGE_RANGE_UNSPECIFIED=0 AGE_RANGE_UNSPECIFIED value + * @property {number} AGE_RANGE_UNKNOWN=1 AGE_RANGE_UNKNOWN value + * @property {number} AGE_RANGE_18_24=2 AGE_RANGE_18_24 value + * @property {number} AGE_RANGE_25_34=3 AGE_RANGE_25_34 value + * @property {number} AGE_RANGE_35_44=4 AGE_RANGE_35_44 value + * @property {number} AGE_RANGE_45_54=5 AGE_RANGE_45_54 value + * @property {number} AGE_RANGE_55_64=6 AGE_RANGE_55_64 value + * @property {number} AGE_RANGE_65_UP=7 AGE_RANGE_65_UP value + */ + v1.AgeRange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGE_RANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGE_RANGE_UNKNOWN"] = 1; + values[valuesById[2] = "AGE_RANGE_18_24"] = 2; + values[valuesById[3] = "AGE_RANGE_25_34"] = 3; + values[valuesById[4] = "AGE_RANGE_35_44"] = 4; + values[valuesById[5] = "AGE_RANGE_45_54"] = 5; + values[valuesById[6] = "AGE_RANGE_55_64"] = 6; + values[valuesById[7] = "AGE_RANGE_65_UP"] = 7; + return values; + })(); + + 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.IUserIdData|null} [userIdData] AudienceMember userIdData + * @property {google.ads.datamanager.v1.IPpidData|null} [ppidData] AudienceMember ppidData + * @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 userIdData. + * @member {google.ads.datamanager.v1.IUserIdData|null|undefined} userIdData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.userIdData = null; + + /** + * AudienceMember ppidData. + * @member {google.ads.datamanager.v1.IPpidData|null|undefined} ppidData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.ppidData = 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"|"userIdData"|"ppidData"|undefined} data + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + Object.defineProperty(AudienceMember.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["userData", "pairData", "mobileData", "userIdData", "ppidData"]), + 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(); + if (message.userIdData != null && Object.hasOwnProperty.call(message, "userIdData")) + $root.google.ads.datamanager.v1.UserIdData.encode(message.userIdData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.ppidData != null && Object.hasOwnProperty.call(message, "ppidData")) + $root.google.ads.datamanager.v1.PpidData.encode(message.ppidData, writer.uint32(/* id 7, wireType 2 =*/58).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 6: { + message.userIdData = $root.google.ads.datamanager.v1.UserIdData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.ppidData = $root.google.ads.datamanager.v1.PpidData.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.userIdData != null && message.hasOwnProperty("userIdData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.UserIdData.verify(message.userIdData); + if (error) + return "userIdData." + error; + } + } + if (message.ppidData != null && message.hasOwnProperty("ppidData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.PpidData.verify(message.ppidData); + if (error) + return "ppidData." + 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.userIdData != null) { + if (typeof object.userIdData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.userIdData: object expected"); + message.userIdData = $root.google.ads.datamanager.v1.UserIdData.fromObject(object.userIdData); + } + if (object.ppidData != null) { + if (typeof object.ppidData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.ppidData: object expected"); + message.ppidData = $root.google.ads.datamanager.v1.PpidData.fromObject(object.ppidData); + } + 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"; + } + if (message.userIdData != null && message.hasOwnProperty("userIdData")) { + object.userIdData = $root.google.ads.datamanager.v1.UserIdData.toObject(message.userIdData, options); + if (options.oneofs) + object.data = "userIdData"; + } + if (message.ppidData != null && message.hasOwnProperty("ppidData")) { + object.ppidData = $root.google.ads.datamanager.v1.PpidData.toObject(message.ppidData, options); + if (options.oneofs) + object.data = "ppidData"; + } + 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.UserIdData = (function() { + + /** + * Properties of a UserIdData. + * @memberof google.ads.datamanager.v1 + * @interface IUserIdData + * @property {string|null} [userId] UserIdData userId + */ + + /** + * Constructs a new UserIdData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserIdData. + * @implements IUserIdData + * @constructor + * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set + */ + function UserIdData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserIdData userId. + * @member {string} userId + * @memberof google.ads.datamanager.v1.UserIdData + * @instance + */ + UserIdData.prototype.userId = ""; + + /** + * Creates a new UserIdData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData instance + */ + UserIdData.create = function create(properties) { + return new UserIdData(properties); + }; + + /** + * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); + return writer; + }; + + /** + * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserIdData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserIdData + * @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.UserIdData} UserIdData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdData.decode = function decode(reader, 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.UserIdData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserIdData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserIdData message. + * @function verify + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserIdData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + return null; + }; + + /** + * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData + */ + UserIdData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserIdData) + return object; + var message = new $root.google.ads.datamanager.v1.UserIdData(); + if (object.userId != null) + message.userId = String(object.userId); + return message; + }; + + /** + * Creates a plain object from a UserIdData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.UserIdData} message UserIdData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserIdData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userId = ""; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this UserIdData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserIdData + * @instance + * @returns {Object.} JSON object + */ + UserIdData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserIdData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserIdData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdData"; + }; + + return UserIdData; + })(); + + v1.PpidData = (function() { + + /** + * Properties of a PpidData. + * @memberof google.ads.datamanager.v1 + * @interface IPpidData + * @property {Array.|null} [ppids] PpidData ppids + */ + + /** + * Constructs a new PpidData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PpidData. + * @implements IPpidData + * @constructor + * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set + */ + function PpidData(properties) { + this.ppids = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PpidData ppids. + * @member {Array.} ppids + * @memberof google.ads.datamanager.v1.PpidData + * @instance + */ + PpidData.prototype.ppids = $util.emptyArray; + + /** + * Creates a new PpidData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PpidData} PpidData instance + */ + PpidData.create = function create(properties) { + return new PpidData(properties); + }; + + /** + * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PpidData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ppids != null && message.ppids.length) + for (var i = 0; i < message.ppids.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ppids[i]); + return writer; + }; + + /** + * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PpidData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PpidData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PpidData + * @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.PpidData} PpidData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PpidData.decode = function decode(reader, 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.PpidData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.ppids && message.ppids.length)) + message.ppids = []; + message.ppids.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PpidData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PpidData} PpidData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PpidData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PpidData message. + * @function verify + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PpidData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ppids != null && message.hasOwnProperty("ppids")) { + if (!Array.isArray(message.ppids)) + return "ppids: array expected"; + for (var i = 0; i < message.ppids.length; ++i) + if (!$util.isString(message.ppids[i])) + return "ppids: string[] expected"; + } + return null; + }; + + /** + * Creates a PpidData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PpidData} PpidData + */ + PpidData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PpidData) + return object; + var message = new $root.google.ads.datamanager.v1.PpidData(); + if (object.ppids) { + if (!Array.isArray(object.ppids)) + throw TypeError(".google.ads.datamanager.v1.PpidData.ppids: array expected"); + message.ppids = []; + for (var i = 0; i < object.ppids.length; ++i) + message.ppids[i] = String(object.ppids[i]); + } + return message; + }; + + /** + * Creates a plain object from a PpidData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.PpidData} message PpidData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PpidData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ppids = []; + if (message.ppids && message.ppids.length) { + object.ppids = []; + for (var j = 0; j < message.ppids.length; ++j) + object.ppids[j] = message.ppids[j]; + } + return object; + }; + + /** + * Converts this PpidData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PpidData + * @instance + * @returns {Object.} JSON object + */ + PpidData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PpidData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PpidData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PpidData"; + }; + + return PpidData; + })(); + + 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 + * @property {string|null} [itemId] Item itemId + * @property {Array.|null} [additionalItemParameters] Item additionalItemParameters + */ + + /** + * 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) { + this.additionalItemParameters = []; + if (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; + + /** + * Item itemId. + * @member {string} itemId + * @memberof google.ads.datamanager.v1.Item + * @instance + */ + Item.prototype.itemId = ""; + + /** + * Item additionalItemParameters. + * @member {Array.} additionalItemParameters + * @memberof google.ads.datamanager.v1.Item + * @instance + */ + Item.prototype.additionalItemParameters = $util.emptyArray; + + /** + * 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); + if (message.itemId != null && Object.hasOwnProperty.call(message, "itemId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.itemId); + if (message.additionalItemParameters != null && message.additionalItemParameters.length) + for (var i = 0; i < message.additionalItemParameters.length; ++i) + $root.google.ads.datamanager.v1.ItemParameter.encode(message.additionalItemParameters[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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; + } + case 4: { + message.itemId = reader.string(); + break; + } + case 5: { + if (!(message.additionalItemParameters && message.additionalItemParameters.length)) + message.additionalItemParameters = []; + message.additionalItemParameters.push($root.google.ads.datamanager.v1.ItemParameter.decode(reader, reader.uint32())); + 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"; + if (message.itemId != null && message.hasOwnProperty("itemId")) + if (!$util.isString(message.itemId)) + return "itemId: string expected"; + if (message.additionalItemParameters != null && message.hasOwnProperty("additionalItemParameters")) { + if (!Array.isArray(message.additionalItemParameters)) + return "additionalItemParameters: array expected"; + for (var i = 0; i < message.additionalItemParameters.length; ++i) { + var error = $root.google.ads.datamanager.v1.ItemParameter.verify(message.additionalItemParameters[i]); + if (error) + return "additionalItemParameters." + error; + } + } + 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); + if (object.itemId != null) + message.itemId = String(object.itemId); + if (object.additionalItemParameters) { + if (!Array.isArray(object.additionalItemParameters)) + throw TypeError(".google.ads.datamanager.v1.Item.additionalItemParameters: array expected"); + message.additionalItemParameters = []; + for (var i = 0; i < object.additionalItemParameters.length; ++i) { + if (typeof object.additionalItemParameters[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.Item.additionalItemParameters: object expected"); + message.additionalItemParameters[i] = $root.google.ads.datamanager.v1.ItemParameter.fromObject(object.additionalItemParameters[i]); + } + } + 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.arrays || options.defaults) + object.additionalItemParameters = []; + 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; + object.itemId = ""; + } + 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; + if (message.itemId != null && message.hasOwnProperty("itemId")) + object.itemId = message.itemId; + if (message.additionalItemParameters && message.additionalItemParameters.length) { + object.additionalItemParameters = []; + for (var j = 0; j < message.additionalItemParameters.length; ++j) + object.additionalItemParameters[j] = $root.google.ads.datamanager.v1.ItemParameter.toObject(message.additionalItemParameters[j], options); + } + 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.ItemParameter = (function() { + + /** + * Properties of an ItemParameter. + * @memberof google.ads.datamanager.v1 + * @interface IItemParameter + * @property {string|null} [parameterName] ItemParameter parameterName + * @property {string|null} [value] ItemParameter value + */ + + /** + * Constructs a new ItemParameter. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an ItemParameter. + * @implements IItemParameter + * @constructor + * @param {google.ads.datamanager.v1.IItemParameter=} [properties] Properties to set + */ + function ItemParameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ItemParameter parameterName. + * @member {string} parameterName + * @memberof google.ads.datamanager.v1.ItemParameter + * @instance + */ + ItemParameter.prototype.parameterName = ""; + + /** + * ItemParameter value. + * @member {string} value + * @memberof google.ads.datamanager.v1.ItemParameter + * @instance + */ + ItemParameter.prototype.value = ""; + + /** + * Creates a new ItemParameter instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {google.ads.datamanager.v1.IItemParameter=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter instance + */ + ItemParameter.create = function create(properties) { + return new ItemParameter(properties); + }; + + /** + * Encodes the specified ItemParameter message. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {google.ads.datamanager.v1.IItemParameter} message ItemParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ItemParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameterName); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified ItemParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {google.ads.datamanager.v1.IItemParameter} message ItemParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ItemParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ItemParameter message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ItemParameter + * @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.ItemParameter} ItemParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ItemParameter.decode = function decode(reader, 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.ItemParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parameterName = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ItemParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ItemParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ItemParameter message. + * @function verify + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ItemParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an ItemParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter + */ + ItemParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ItemParameter) + return object; + var message = new $root.google.ads.datamanager.v1.ItemParameter(); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an ItemParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {google.ads.datamanager.v1.ItemParameter} message ItemParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ItemParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parameterName = ""; + object.value = ""; + } + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ItemParameter to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ItemParameter + * @instance + * @returns {Object.} JSON object + */ + ItemParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ItemParameter + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ItemParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ItemParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ItemParameter"; + }; + + return ItemParameter; + })(); + + 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: + case 5: + case 6: + 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; + case "GOOGLE_ANALYTICS_PROPERTY": + case 5: + message.accountType = 5; + break; + case "GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 6: + message.accountType = 6; + 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 + * @property {number} GOOGLE_ANALYTICS_PROPERTY=5 GOOGLE_ANALYTICS_PROPERTY value + * @property {number} GOOGLE_AD_MANAGER_AUDIENCE_LINK=6 GOOGLE_AD_MANAGER_AUDIENCE_LINK 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; + values[valuesById[5] = "GOOGLE_ANALYTICS_PROPERTY"] = 5; + values[valuesById[6] = "GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 6; + 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 + * @property {google.ads.datamanager.v1.IAwsWrappedKeyInfo|null} [awsWrappedKeyInfo] EncryptionInfo awsWrappedKeyInfo + */ + + /** + * 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; + + /** + * EncryptionInfo awsWrappedKeyInfo. + * @member {google.ads.datamanager.v1.IAwsWrappedKeyInfo|null|undefined} awsWrappedKeyInfo + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.awsWrappedKeyInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EncryptionInfo wrappedKey. + * @member {"gcpWrappedKeyInfo"|"awsWrappedKeyInfo"|undefined} wrappedKey + * @memberof google.ads.datamanager.v1.EncryptionInfo + * @instance + */ + Object.defineProperty(EncryptionInfo.prototype, "wrappedKey", { + get: $util.oneOfGetter($oneOfFields = ["gcpWrappedKeyInfo", "awsWrappedKeyInfo"]), + 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(); + if (message.awsWrappedKeyInfo != null && Object.hasOwnProperty.call(message, "awsWrappedKeyInfo")) + $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.encode(message.awsWrappedKeyInfo, writer.uint32(/* id 2, wireType 2 =*/18).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; + } + case 2: { + message.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.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; + } + } + if (message.awsWrappedKeyInfo != null && message.hasOwnProperty("awsWrappedKeyInfo")) { + if (properties.wrappedKey === 1) + return "wrappedKey: multiple values"; + properties.wrappedKey = 1; + { + var error = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.verify(message.awsWrappedKeyInfo); + if (error) + return "awsWrappedKeyInfo." + 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); + } + if (object.awsWrappedKeyInfo != null) { + if (typeof object.awsWrappedKeyInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.EncryptionInfo.awsWrappedKeyInfo: object expected"); + message.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.fromObject(object.awsWrappedKeyInfo); + } + 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"; + } + if (message.awsWrappedKeyInfo != null && message.hasOwnProperty("awsWrappedKeyInfo")) { + object.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.toObject(message.awsWrappedKeyInfo, options); + if (options.oneofs) + object.wrappedKey = "awsWrappedKeyInfo"; + } + 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; + })(); + + v1.AwsWrappedKeyInfo = (function() { + + /** + * Properties of an AwsWrappedKeyInfo. + * @memberof google.ads.datamanager.v1 + * @interface IAwsWrappedKeyInfo + * @property {google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|null} [keyType] AwsWrappedKeyInfo keyType + * @property {string|null} [roleArn] AwsWrappedKeyInfo roleArn + * @property {string|null} [kekUri] AwsWrappedKeyInfo kekUri + * @property {string|null} [encryptedDek] AwsWrappedKeyInfo encryptedDek + */ + + /** + * Constructs a new AwsWrappedKeyInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an AwsWrappedKeyInfo. + * @implements IAwsWrappedKeyInfo + * @constructor + * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo=} [properties] Properties to set + */ + function AwsWrappedKeyInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsWrappedKeyInfo keyType. + * @member {google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType} keyType + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @instance + */ + AwsWrappedKeyInfo.prototype.keyType = 0; + + /** + * AwsWrappedKeyInfo roleArn. + * @member {string} roleArn + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @instance + */ + AwsWrappedKeyInfo.prototype.roleArn = ""; + + /** + * AwsWrappedKeyInfo kekUri. + * @member {string} kekUri + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @instance + */ + AwsWrappedKeyInfo.prototype.kekUri = ""; + + /** + * AwsWrappedKeyInfo encryptedDek. + * @member {string} encryptedDek + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @instance + */ + AwsWrappedKeyInfo.prototype.encryptedDek = ""; + + /** + * Creates a new AwsWrappedKeyInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo instance + */ + AwsWrappedKeyInfo.create = function create(properties) { + return new AwsWrappedKeyInfo(properties); + }; + + /** + * Encodes the specified AwsWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo} message AwsWrappedKeyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsWrappedKeyInfo.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.roleArn != null && Object.hasOwnProperty.call(message, "roleArn")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.roleArn); + 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 AwsWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo} message AwsWrappedKeyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsWrappedKeyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @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.AwsWrappedKeyInfo} AwsWrappedKeyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsWrappedKeyInfo.decode = function decode(reader, 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.AwsWrappedKeyInfo(); + 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.roleArn = 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 an AwsWrappedKeyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsWrappedKeyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsWrappedKeyInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsWrappedKeyInfo.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.roleArn != null && message.hasOwnProperty("roleArn")) + if (!$util.isString(message.roleArn)) + return "roleArn: 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 an AwsWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo + */ + AwsWrappedKeyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.AwsWrappedKeyInfo) + return object; + var message = new $root.google.ads.datamanager.v1.AwsWrappedKeyInfo(); + 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.roleArn != null) + message.roleArn = String(object.roleArn); + 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 an AwsWrappedKeyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {google.ads.datamanager.v1.AwsWrappedKeyInfo} message AwsWrappedKeyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsWrappedKeyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyType = options.enums === String ? "KEY_TYPE_UNSPECIFIED" : 0; + object.roleArn = ""; + object.kekUri = ""; + object.encryptedDek = ""; + } + if (message.keyType != null && message.hasOwnProperty("keyType")) + object.keyType = options.enums === String ? $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType[message.keyType] === undefined ? message.keyType : $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType[message.keyType] : message.keyType; + if (message.roleArn != null && message.hasOwnProperty("roleArn")) + object.roleArn = message.roleArn; + 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 AwsWrappedKeyInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @instance + * @returns {Object.} JSON object + */ + AwsWrappedKeyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsWrappedKeyInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsWrappedKeyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.AwsWrappedKeyInfo"; + }; + + /** + * KeyType enum. + * @name google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType + * @enum {number} + * @property {number} KEY_TYPE_UNSPECIFIED=0 KEY_TYPE_UNSPECIFIED value + * @property {number} XCHACHA20_POLY1305=1 XCHACHA20_POLY1305 value + */ + AwsWrappedKeyInfo.KeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "XCHACHA20_POLY1305"] = 1; + return values; + })(); + + return AwsWrappedKeyInfo; + })(); + + /** + * 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} UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER=37 UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER value + * @property {number} UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER=38 UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER value + * @property {number} NO_IDENTIFIERS_PROVIDED=39 NO_IDENTIFIERS_PROVIDED value + * @property {number} INVALID_PROPERTY_TYPE=40 INVALID_PROPERTY_TYPE value + * @property {number} INVALID_STREAM_TYPE=41 INVALID_STREAM_TYPE value + * @property {number} LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT=42 LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT value + * @property {number} OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH=43 OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH value + * @property {number} EVENT_TIME_INVALID=44 EVENT_TIME_INVALID value + * @property {number} RESERVED_NAME_USED=45 RESERVED_NAME_USED value + * @property {number} INVALID_EVENT_NAME=46 INVALID_EVENT_NAME value + * @property {number} NOT_ALLOWLISTED=47 NOT_ALLOWLISTED value + * @property {number} INVALID_REQUEST_ID=48 INVALID_REQUEST_ID value + * @property {number} MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT=49 MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT value + * @property {number} FIELD_VALUE_TOO_LONG=50 FIELD_VALUE_TOO_LONG value + * @property {number} TOO_MANY_ELEMENTS=51 TOO_MANY_ELEMENTS value + * @property {number} ALREADY_EXISTS=52 ALREADY_EXISTS value + * @property {number} IMMUTABLE_FIELD_FOR_UPDATE=53 IMMUTABLE_FIELD_FOR_UPDATE value + * @property {number} INVALID_RESOURCE_NAME=54 INVALID_RESOURCE_NAME value + * @property {number} INVALID_FILTER=55 INVALID_FILTER value + * @property {number} INVALID_UPDATE_MASK=56 INVALID_UPDATE_MASK value + * @property {number} INVALID_PAGE_TOKEN=57 INVALID_PAGE_TOKEN value + * @property {number} CANNOT_UPDATE_DISABLED_LICENSE=58 CANNOT_UPDATE_DISABLED_LICENSE value + * @property {number} CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST=59 CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST value + * @property {number} INSUFFICIENT_COST=60 INSUFFICIENT_COST value + * @property {number} CANNOT_DISABLE_LICENSE=61 CANNOT_DISABLE_LICENSE value + * @property {number} INVALID_CLIENT_ACCOUNT_ID=62 INVALID_CLIENT_ACCOUNT_ID value + * @property {number} PRICING_ONLY_ZERO_COST_ALLOWED=63 PRICING_ONLY_ZERO_COST_ALLOWED value + * @property {number} PRICE_TOO_HIGH=64 PRICE_TOO_HIGH value + * @property {number} CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE=65 CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE value + * @property {number} INVALID_PRICING_END_DATE=66 INVALID_PRICING_END_DATE value + * @property {number} CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT=67 CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT value + * @property {number} MISMATCHED_ACCOUNT_TYPE=68 MISMATCHED_ACCOUNT_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE=69 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER=70 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER value + * @property {number} INVALID_MEDIA_SHARE_COST=71 INVALID_MEDIA_SHARE_COST value + * @property {number} INVALID_COST_TYPE=72 INVALID_COST_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST=73 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST value + * @property {number} MAX_COST_NOT_ALLOWED=74 MAX_COST_NOT_ALLOWED value + * @property {number} COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED=75 COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED value + * @property {number} INVALID_DESCRIPTION=76 INVALID_DESCRIPTION value + * @property {number} INVALID_DISPLAY_NAME=77 INVALID_DISPLAY_NAME value + * @property {number} DISPLAY_NAME_ALREADY_USED=78 DISPLAY_NAME_ALREADY_USED value + * @property {number} OWNERSHIP_REQUIRED_FOR_UPDATE=79 OWNERSHIP_REQUIRED_FOR_UPDATE value + * @property {number} USER_LIST_MUTATION_NOT_SUPPORTED=80 USER_LIST_MUTATION_NOT_SUPPORTED value + * @property {number} SENSITIVE_USER_LIST_IMMUTABLE=81 SENSITIVE_USER_LIST_IMMUTABLE value + * @property {number} BILLABLE_RECORD_COUNT_IMMUTABLE=82 BILLABLE_RECORD_COUNT_IMMUTABLE value + * @property {number} USER_LIST_NAME_RESERVED=83 USER_LIST_NAME_RESERVED value + * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA=84 ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA value + * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_SOURCE=85 UNSUPPORTED_PARTNER_AUDIENCE_SOURCE value + * @property {number} COMMERCE_PARTNER_NOT_ALLOWED=86 COMMERCE_PARTNER_NOT_ALLOWED value + * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_INFO=87 UNSUPPORTED_PARTNER_AUDIENCE_INFO value + * @property {number} PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED=88 PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED value + * @property {number} DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=89 DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value + * @property {number} ADVERTISER_TOS_NOT_ACCEPTED=90 ADVERTISER_TOS_NOT_ACCEPTED value + * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=91 ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value + * @property {number} USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT=92 USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT value + * @property {number} INVALID_COMMERCE_PARTNER=93 INVALID_COMMERCE_PARTNER value + * @property {number} CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE=94 CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE value + * @property {number} UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES=95 UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES value + * @property {number} UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG=96 UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG value + * @property {number} UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE=97 UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE value + * @property {number} UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK=98 UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK 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[37] = "UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER"] = 37; + values[valuesById[38] = "UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER"] = 38; + values[valuesById[39] = "NO_IDENTIFIERS_PROVIDED"] = 39; + values[valuesById[40] = "INVALID_PROPERTY_TYPE"] = 40; + values[valuesById[41] = "INVALID_STREAM_TYPE"] = 41; + values[valuesById[42] = "LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT"] = 42; + values[valuesById[43] = "OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH"] = 43; + values[valuesById[44] = "EVENT_TIME_INVALID"] = 44; + values[valuesById[45] = "RESERVED_NAME_USED"] = 45; + values[valuesById[46] = "INVALID_EVENT_NAME"] = 46; + values[valuesById[47] = "NOT_ALLOWLISTED"] = 47; + values[valuesById[48] = "INVALID_REQUEST_ID"] = 48; + values[valuesById[49] = "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT"] = 49; + values[valuesById[50] = "FIELD_VALUE_TOO_LONG"] = 50; + values[valuesById[51] = "TOO_MANY_ELEMENTS"] = 51; + values[valuesById[52] = "ALREADY_EXISTS"] = 52; + values[valuesById[53] = "IMMUTABLE_FIELD_FOR_UPDATE"] = 53; + values[valuesById[54] = "INVALID_RESOURCE_NAME"] = 54; + values[valuesById[55] = "INVALID_FILTER"] = 55; + values[valuesById[56] = "INVALID_UPDATE_MASK"] = 56; + values[valuesById[57] = "INVALID_PAGE_TOKEN"] = 57; + values[valuesById[58] = "CANNOT_UPDATE_DISABLED_LICENSE"] = 58; + values[valuesById[59] = "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST"] = 59; + values[valuesById[60] = "INSUFFICIENT_COST"] = 60; + values[valuesById[61] = "CANNOT_DISABLE_LICENSE"] = 61; + values[valuesById[62] = "INVALID_CLIENT_ACCOUNT_ID"] = 62; + values[valuesById[63] = "PRICING_ONLY_ZERO_COST_ALLOWED"] = 63; + values[valuesById[64] = "PRICE_TOO_HIGH"] = 64; + values[valuesById[65] = "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE"] = 65; + values[valuesById[66] = "INVALID_PRICING_END_DATE"] = 66; + values[valuesById[67] = "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT"] = 67; + values[valuesById[68] = "MISMATCHED_ACCOUNT_TYPE"] = 68; + values[valuesById[69] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE"] = 69; + values[valuesById[70] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER"] = 70; + values[valuesById[71] = "INVALID_MEDIA_SHARE_COST"] = 71; + values[valuesById[72] = "INVALID_COST_TYPE"] = 72; + values[valuesById[73] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST"] = 73; + values[valuesById[74] = "MAX_COST_NOT_ALLOWED"] = 74; + values[valuesById[75] = "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED"] = 75; + values[valuesById[76] = "INVALID_DESCRIPTION"] = 76; + values[valuesById[77] = "INVALID_DISPLAY_NAME"] = 77; + values[valuesById[78] = "DISPLAY_NAME_ALREADY_USED"] = 78; + values[valuesById[79] = "OWNERSHIP_REQUIRED_FOR_UPDATE"] = 79; + values[valuesById[80] = "USER_LIST_MUTATION_NOT_SUPPORTED"] = 80; + values[valuesById[81] = "SENSITIVE_USER_LIST_IMMUTABLE"] = 81; + values[valuesById[82] = "BILLABLE_RECORD_COUNT_IMMUTABLE"] = 82; + values[valuesById[83] = "USER_LIST_NAME_RESERVED"] = 83; + values[valuesById[84] = "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA"] = 84; + values[valuesById[85] = "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE"] = 85; + values[valuesById[86] = "COMMERCE_PARTNER_NOT_ALLOWED"] = 86; + values[valuesById[87] = "UNSUPPORTED_PARTNER_AUDIENCE_INFO"] = 87; + values[valuesById[88] = "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED"] = 88; + values[valuesById[89] = "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 89; + values[valuesById[90] = "ADVERTISER_TOS_NOT_ACCEPTED"] = 90; + values[valuesById[91] = "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 91; + values[valuesById[92] = "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT"] = 92; + values[valuesById[93] = "INVALID_COMMERCE_PARTNER"] = 93; + values[valuesById[94] = "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE"] = 94; + values[valuesById[95] = "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES"] = 95; + values[valuesById[96] = "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG"] = 96; + values[valuesById[97] = "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE"] = 97; + values[valuesById[98] = "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK"] = 98; + 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 + * @property {string|null} [eventName] Event eventName + * @property {string|null} [clientId] Event clientId + * @property {string|null} [userId] Event userId + * @property {Array.|null} [additionalEventParameters] Event additionalEventParameters + */ + + /** + * 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 = []; + this.additionalEventParameters = []; + if (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|null|undefined} conversionValue + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.conversionValue = null; + + /** + * 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; + + /** + * Event eventName. + * @member {string} eventName + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.eventName = ""; + + /** + * Event clientId. + * @member {string} clientId + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.clientId = ""; + + /** + * Event userId. + * @member {string} userId + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.userId = ""; + + /** + * Event additionalEventParameters. + * @member {Array.} additionalEventParameters + * @memberof google.ads.datamanager.v1.Event + * @instance + */ + Event.prototype.additionalEventParameters = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Event.prototype, "_conversionValue", { + get: $util.oneOfGetter($oneOfFields = ["conversionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * 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(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.eventName); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.clientId); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.userId); + if (message.additionalEventParameters != null && message.additionalEventParameters.length) + for (var i = 0; i < message.additionalEventParameters.length; ++i) + $root.google.ads.datamanager.v1.EventParameter.encode(message.additionalEventParameters[i], writer.uint32(/* id 19, wireType 2 =*/154).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; + } + case 16: { + message.eventName = reader.string(); + break; + } + case 17: { + message.clientId = reader.string(); + break; + } + case 18: { + message.userId = reader.string(); + break; + } + case 19: { + if (!(message.additionalEventParameters && message.additionalEventParameters.length)) + message.additionalEventParameters = []; + message.additionalEventParameters.push($root.google.ads.datamanager.v1.EventParameter.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"; + 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.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")) { + properties._conversionValue = 1; + 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; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.additionalEventParameters != null && message.hasOwnProperty("additionalEventParameters")) { + if (!Array.isArray(message.additionalEventParameters)) + return "additionalEventParameters: array expected"; + for (var i = 0; i < message.additionalEventParameters.length; ++i) { + var error = $root.google.ads.datamanager.v1.EventParameter.verify(message.additionalEventParameters[i]); + if (error) + return "additionalEventParameters." + 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); + } + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.userId != null) + message.userId = String(object.userId); + if (object.additionalEventParameters) { + if (!Array.isArray(object.additionalEventParameters)) + throw TypeError(".google.ads.datamanager.v1.Event.additionalEventParameters: array expected"); + message.additionalEventParameters = []; + for (var i = 0; i < object.additionalEventParameters.length; ++i) { + if (typeof object.additionalEventParameters[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.Event.additionalEventParameters: object expected"); + message.additionalEventParameters[i] = $root.google.ads.datamanager.v1.EventParameter.fromObject(object.additionalEventParameters[i]); + } + } + 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 = []; + object.additionalEventParameters = []; + } + if (options.defaults) { + object.transactionId = ""; + object.eventTimestamp = null; + object.lastUpdatedTimestamp = null; + object.userData = null; + object.consent = null; + object.adIdentifiers = null; + object.currency = ""; + object.eventSource = options.enums === String ? "EVENT_SOURCE_UNSPECIFIED" : 0; + object.eventDeviceInfo = null; + object.cartData = null; + object.userProperties = null; + object.eventName = ""; + object.clientId = ""; + object.userId = ""; + } + 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 (options.oneofs) + object._conversionValue = "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); + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.additionalEventParameters && message.additionalEventParameters.length) { + object.additionalEventParameters = []; + for (var j = 0; j < message.additionalEventParameters.length; ++j) + object.additionalEventParameters[j] = $root.google.ads.datamanager.v1.EventParameter.toObject(message.additionalEventParameters[j], 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; + })(); + + v1.EventParameter = (function() { + + /** + * Properties of an EventParameter. + * @memberof google.ads.datamanager.v1 + * @interface IEventParameter + * @property {string|null} [parameterName] EventParameter parameterName + * @property {string|null} [value] EventParameter value + */ + + /** + * Constructs a new EventParameter. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an EventParameter. + * @implements IEventParameter + * @constructor + * @param {google.ads.datamanager.v1.IEventParameter=} [properties] Properties to set + */ + function EventParameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventParameter parameterName. + * @member {string} parameterName + * @memberof google.ads.datamanager.v1.EventParameter + * @instance + */ + EventParameter.prototype.parameterName = ""; + + /** + * EventParameter value. + * @member {string} value + * @memberof google.ads.datamanager.v1.EventParameter + * @instance + */ + EventParameter.prototype.value = ""; + + /** + * Creates a new EventParameter instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {google.ads.datamanager.v1.IEventParameter=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.EventParameter} EventParameter instance + */ + EventParameter.create = function create(properties) { + return new EventParameter(properties); + }; + + /** + * Encodes the specified EventParameter message. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {google.ads.datamanager.v1.IEventParameter} message EventParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameterName); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified EventParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {google.ads.datamanager.v1.IEventParameter} message EventParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventParameter message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.EventParameter + * @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.EventParameter} EventParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventParameter.decode = function decode(reader, 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.EventParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parameterName = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.EventParameter} EventParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventParameter message. + * @function verify + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EventParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.EventParameter} EventParameter + */ + EventParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.EventParameter) + return object; + var message = new $root.google.ads.datamanager.v1.EventParameter(); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EventParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {google.ads.datamanager.v1.EventParameter} message EventParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parameterName = ""; + object.value = ""; + } + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this EventParameter to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.EventParameter + * @instance + * @returns {Object.} JSON object + */ + EventParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventParameter + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.EventParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.EventParameter"; + }; + + return EventParameter; + })(); + + /** + * 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 + * @property {Array.|null} [additionalUserProperties] UserProperties additionalUserProperties + */ + + /** + * 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) { + this.additionalUserProperties = []; + if (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; + + /** + * UserProperties additionalUserProperties. + * @member {Array.} additionalUserProperties + * @memberof google.ads.datamanager.v1.UserProperties + * @instance + */ + UserProperties.prototype.additionalUserProperties = $util.emptyArray; + + /** + * 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); + if (message.additionalUserProperties != null && message.additionalUserProperties.length) + for (var i = 0; i < message.additionalUserProperties.length; ++i) + $root.google.ads.datamanager.v1.UserProperty.encode(message.additionalUserProperties[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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; + } + case 3: { + if (!(message.additionalUserProperties && message.additionalUserProperties.length)) + message.additionalUserProperties = []; + message.additionalUserProperties.push($root.google.ads.datamanager.v1.UserProperty.decode(reader, reader.uint32())); + 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; + } + if (message.additionalUserProperties != null && message.hasOwnProperty("additionalUserProperties")) { + if (!Array.isArray(message.additionalUserProperties)) + return "additionalUserProperties: array expected"; + for (var i = 0; i < message.additionalUserProperties.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserProperty.verify(message.additionalUserProperties[i]); + if (error) + return "additionalUserProperties." + error; + } + } + 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; + } + if (object.additionalUserProperties) { + if (!Array.isArray(object.additionalUserProperties)) + throw TypeError(".google.ads.datamanager.v1.UserProperties.additionalUserProperties: array expected"); + message.additionalUserProperties = []; + for (var i = 0; i < object.additionalUserProperties.length; ++i) { + if (typeof object.additionalUserProperties[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserProperties.additionalUserProperties: object expected"); + message.additionalUserProperties[i] = $root.google.ads.datamanager.v1.UserProperty.fromObject(object.additionalUserProperties[i]); + } + } + 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.arrays || options.defaults) + object.additionalUserProperties = []; + 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; + if (message.additionalUserProperties && message.additionalUserProperties.length) { + object.additionalUserProperties = []; + for (var j = 0; j < message.additionalUserProperties.length; ++j) + object.additionalUserProperties[j] = $root.google.ads.datamanager.v1.UserProperty.toObject(message.additionalUserProperties[j], options); + } + 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; + })(); + + v1.UserProperty = (function() { + + /** + * Properties of a UserProperty. + * @memberof google.ads.datamanager.v1 + * @interface IUserProperty + * @property {string|null} [propertyName] UserProperty propertyName + * @property {string|null} [value] UserProperty value + */ + + /** + * Constructs a new UserProperty. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserProperty. + * @implements IUserProperty + * @constructor + * @param {google.ads.datamanager.v1.IUserProperty=} [properties] Properties to set + */ + function UserProperty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserProperty propertyName. + * @member {string} propertyName + * @memberof google.ads.datamanager.v1.UserProperty + * @instance + */ + UserProperty.prototype.propertyName = ""; + + /** + * UserProperty value. + * @member {string} value + * @memberof google.ads.datamanager.v1.UserProperty + * @instance + */ + UserProperty.prototype.value = ""; + + /** + * Creates a new UserProperty instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {google.ads.datamanager.v1.IUserProperty=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserProperty} UserProperty instance + */ + UserProperty.create = function create(properties) { + return new UserProperty(properties); + }; + + /** + * Encodes the specified UserProperty message. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {google.ads.datamanager.v1.IUserProperty} message UserProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProperty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.propertyName != null && Object.hasOwnProperty.call(message, "propertyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.propertyName); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified UserProperty message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {google.ads.datamanager.v1.IUserProperty} message UserProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserProperty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserProperty message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserProperty + * @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.UserProperty} UserProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProperty.decode = function decode(reader, 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.UserProperty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.propertyName = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserProperty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserProperty} UserProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserProperty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserProperty message. + * @function verify + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserProperty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.propertyName != null && message.hasOwnProperty("propertyName")) + if (!$util.isString(message.propertyName)) + return "propertyName: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a UserProperty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserProperty} UserProperty + */ + UserProperty.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserProperty) + return object; + var message = new $root.google.ads.datamanager.v1.UserProperty(); + if (object.propertyName != null) + message.propertyName = String(object.propertyName); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a UserProperty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {google.ads.datamanager.v1.UserProperty} message UserProperty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserProperty.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.propertyName = ""; + object.value = ""; + } + if (message.propertyName != null && message.hasOwnProperty("propertyName")) + object.propertyName = message.propertyName; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UserProperty to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserProperty + * @instance + * @returns {Object.} JSON object + */ + UserProperty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserProperty + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserProperty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserProperty"; + }; + + return UserProperty; + })(); + + /** + * 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; + })(); + + /** + * Gender enum. + * @name google.ads.datamanager.v1.Gender + * @enum {number} + * @property {number} GENDER_UNSPECIFIED=0 GENDER_UNSPECIFIED value + * @property {number} GENDER_UNKNOWN=1 GENDER_UNKNOWN value + * @property {number} GENDER_MALE=2 GENDER_MALE value + * @property {number} GENDER_FEMALE=3 GENDER_FEMALE value + */ + v1.Gender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "GENDER_UNKNOWN"] = 1; + values[valuesById[2] = "GENDER_MALE"] = 2; + values[valuesById[3] = "GENDER_FEMALE"] = 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 + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null} [userIdDataIngestionStatus] IngestAudienceMembersStatus userIdDataIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null} [ppidDataIngestionStatus] IngestAudienceMembersStatus ppidDataIngestionStatus + */ + + /** + * 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; + + /** + * IngestAudienceMembersStatus userIdDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null|undefined} userIdDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.userIdDataIngestionStatus = null; + + /** + * IngestAudienceMembersStatus ppidDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null|undefined} ppidDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.ppidDataIngestionStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IngestAudienceMembersStatus status. + * @member {"userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"|undefined} status + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + Object.defineProperty(IngestAudienceMembersStatus.prototype, "status", { + get: $util.oneOfGetter($oneOfFields = ["userDataIngestionStatus", "mobileDataIngestionStatus", "pairDataIngestionStatus", "userIdDataIngestionStatus", "ppidDataIngestionStatus"]), + 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(); + if (message.userIdDataIngestionStatus != null && Object.hasOwnProperty.call(message, "userIdDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.encode(message.userIdDataIngestionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ppidDataIngestionStatus != null && Object.hasOwnProperty.call(message, "ppidDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.encode(message.ppidDataIngestionStatus, writer.uint32(/* id 5, wireType 2 =*/42).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; + } + case 4: { + message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.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; + } + } + if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify(message.userIdDataIngestionStatus); + if (error) + return "userIdDataIngestionStatus." + error; + } + } + if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify(message.ppidDataIngestionStatus); + if (error) + return "ppidDataIngestionStatus." + 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); + } + if (object.userIdDataIngestionStatus != null) { + if (typeof object.userIdDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.userIdDataIngestionStatus: object expected"); + message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.fromObject(object.userIdDataIngestionStatus); + } + if (object.ppidDataIngestionStatus != null) { + if (typeof object.ppidDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.ppidDataIngestionStatus: object expected"); + message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.fromObject(object.ppidDataIngestionStatus); + } + 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"; + } + if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { + object.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.toObject(message.userIdDataIngestionStatus, options); + if (options.oneofs) + object.status = "userIdDataIngestionStatus"; + } + if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { + object.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.toObject(message.ppidDataIngestionStatus, options); + if (options.oneofs) + object.status = "ppidDataIngestionStatus"; + } + 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 + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null} [userIdDataRemovalStatus] RemoveAudienceMembersStatus userIdDataRemovalStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null} [ppidDataRemovalStatus] RemoveAudienceMembersStatus ppidDataRemovalStatus + */ + + /** + * 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; + + /** + * RemoveAudienceMembersStatus userIdDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null|undefined} userIdDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.userIdDataRemovalStatus = null; + + /** + * RemoveAudienceMembersStatus ppidDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null|undefined} ppidDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.ppidDataRemovalStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RemoveAudienceMembersStatus status. + * @member {"userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"|undefined} status + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + Object.defineProperty(RemoveAudienceMembersStatus.prototype, "status", { + get: $util.oneOfGetter($oneOfFields = ["userDataRemovalStatus", "mobileDataRemovalStatus", "pairDataRemovalStatus", "userIdDataRemovalStatus", "ppidDataRemovalStatus"]), + 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(); + if (message.userIdDataRemovalStatus != null && Object.hasOwnProperty.call(message, "userIdDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.encode(message.userIdDataRemovalStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ppidDataRemovalStatus != null && Object.hasOwnProperty.call(message, "ppidDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.encode(message.ppidDataRemovalStatus, writer.uint32(/* id 5, wireType 2 =*/42).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; + } + case 4: { + message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.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; + } + } + if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify(message.userIdDataRemovalStatus); + if (error) + return "userIdDataRemovalStatus." + error; + } + } + if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify(message.ppidDataRemovalStatus); + if (error) + return "ppidDataRemovalStatus." + 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); + } + if (object.userIdDataRemovalStatus != null) { + if (typeof object.userIdDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.userIdDataRemovalStatus: object expected"); + message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.fromObject(object.userIdDataRemovalStatus); + } + if (object.ppidDataRemovalStatus != null) { + if (typeof object.ppidDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.ppidDataRemovalStatus: object expected"); + message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.fromObject(object.ppidDataRemovalStatus); + } + 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"; + } + if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { + object.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.toObject(message.userIdDataRemovalStatus, options); + if (options.oneofs) + object.status = "userIdDataRemovalStatus"; + } + if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { + object.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.toObject(message.ppidDataRemovalStatus, options); + if (options.oneofs) + object.status = "ppidDataRemovalStatus"; + } + 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; + })(); + + RequestStatusPerDestination.IngestUserIdDataStatus = (function() { + + /** + * Properties of an IngestUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestUserIdDataStatus + * @property {number|Long|null} [recordCount] IngestUserIdDataStatus recordCount + * @property {number|Long|null} [userIdCount] IngestUserIdDataStatus userIdCount + */ + + /** + * Constructs a new IngestUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestUserIdDataStatus. + * @implements IIngestUserIdDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set + */ + function IngestUserIdDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestUserIdDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + */ + IngestUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestUserIdDataStatus userIdCount. + * @member {number|Long} userIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + */ + IngestUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestUserIdDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus instance + */ + IngestUserIdDataStatus.create = function create(properties) { + return new IngestUserIdDataStatus(properties); + }; + + /** + * Encodes the specified IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); + return writer; + }; + + /** + * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserIdDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @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.IngestUserIdDataStatus} IngestUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserIdDataStatus.decode = function decode(reader, 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.IngestUserIdDataStatus(); + 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.userIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserIdDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestUserIdDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) + return "userIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus + */ + IngestUserIdDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus(); + 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.userIdCount != null) + if ($util.Long) + (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; + else if (typeof object.userIdCount === "string") + message.userIdCount = parseInt(object.userIdCount, 10); + else if (typeof object.userIdCount === "number") + message.userIdCount = object.userIdCount; + else if (typeof object.userIdCount === "object") + message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} message IngestUserIdDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (typeof message.userIdCount === "number") + object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; + else + object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; + return object; + }; + + /** + * Converts this IngestUserIdDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestUserIdDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestUserIdDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus"; + }; + + return IngestUserIdDataStatus; + })(); + + RequestStatusPerDestination.RemoveUserIdDataStatus = (function() { + + /** + * Properties of a RemoveUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemoveUserIdDataStatus + * @property {number|Long|null} [recordCount] RemoveUserIdDataStatus recordCount + * @property {number|Long|null} [userIdCount] RemoveUserIdDataStatus userIdCount + */ + + /** + * Constructs a new RemoveUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemoveUserIdDataStatus. + * @implements IRemoveUserIdDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set + */ + function RemoveUserIdDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveUserIdDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + */ + RemoveUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemoveUserIdDataStatus userIdCount. + * @member {number|Long} userIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + */ + RemoveUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemoveUserIdDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus instance + */ + RemoveUserIdDataStatus.create = function create(properties) { + return new RemoveUserIdDataStatus(properties); + }; + + /** + * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); + return writer; + }; + + /** + * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserIdDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @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.RemoveUserIdDataStatus} RemoveUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserIdDataStatus.decode = function decode(reader, 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.RemoveUserIdDataStatus(); + 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.userIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserIdDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveUserIdDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) + return "userIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus + */ + RemoveUserIdDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus(); + 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.userIdCount != null) + if ($util.Long) + (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; + else if (typeof object.userIdCount === "string") + message.userIdCount = parseInt(object.userIdCount, 10); + else if (typeof object.userIdCount === "number") + message.userIdCount = object.userIdCount; + else if (typeof object.userIdCount === "object") + message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} message RemoveUserIdDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (typeof message.userIdCount === "number") + object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; + else + object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; + return object; + }; + + /** + * Converts this RemoveUserIdDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemoveUserIdDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveUserIdDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus"; + }; + + return RemoveUserIdDataStatus; + })(); + + RequestStatusPerDestination.IngestPpidDataStatus = (function() { + + /** + * Properties of an IngestPpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestPpidDataStatus + * @property {number|Long|null} [recordCount] IngestPpidDataStatus recordCount + * @property {number|Long|null} [ppidCount] IngestPpidDataStatus ppidCount + */ + + /** + * Constructs a new IngestPpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestPpidDataStatus. + * @implements IIngestPpidDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set + */ + function IngestPpidDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestPpidDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + */ + IngestPpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestPpidDataStatus ppidCount. + * @member {number|Long} ppidCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + */ + IngestPpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestPpidDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus instance + */ + IngestPpidDataStatus.create = function create(properties) { + return new IngestPpidDataStatus(properties); + }; + + /** + * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); + return writer; + }; + + /** + * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @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.IngestPpidDataStatus} IngestPpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPpidDataStatus.decode = function decode(reader, 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.IngestPpidDataStatus(); + 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.ppidCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPpidDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestPpidDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestPpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) + return "ppidCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus + */ + IngestPpidDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus(); + 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.ppidCount != null) + if ($util.Long) + (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; + else if (typeof object.ppidCount === "string") + message.ppidCount = parseInt(object.ppidCount, 10); + else if (typeof object.ppidCount === "number") + message.ppidCount = object.ppidCount; + else if (typeof object.ppidCount === "object") + message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} message IngestPpidDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestPpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (typeof message.ppidCount === "number") + object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; + else + object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; + return object; + }; + + /** + * Converts this IngestPpidDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestPpidDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestPpidDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestPpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus"; + }; + + return IngestPpidDataStatus; + })(); + + RequestStatusPerDestination.RemovePpidDataStatus = (function() { + + /** + * Properties of a RemovePpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemovePpidDataStatus + * @property {number|Long|null} [recordCount] RemovePpidDataStatus recordCount + * @property {number|Long|null} [ppidCount] RemovePpidDataStatus ppidCount + */ + + /** + * Constructs a new RemovePpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemovePpidDataStatus. + * @implements IRemovePpidDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set + */ + function RemovePpidDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemovePpidDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + */ + RemovePpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemovePpidDataStatus ppidCount. + * @member {number|Long} ppidCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + */ + RemovePpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemovePpidDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus instance + */ + RemovePpidDataStatus.create = function create(properties) { + return new RemovePpidDataStatus(properties); + }; + + /** + * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); + return writer; + }; + + /** + * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @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.RemovePpidDataStatus} RemovePpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePpidDataStatus.decode = function decode(reader, 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.RemovePpidDataStatus(); + 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.ppidCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePpidDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePpidDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) + return "ppidCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus + */ + RemovePpidDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus(); + 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.ppidCount != null) + if ($util.Long) + (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; + else if (typeof object.ppidCount === "string") + message.ppidCount = parseInt(object.ppidCount, 10); + else if (typeof object.ppidCount === "number") + message.ppidCount = object.ppidCount; + else if (typeof object.ppidCount === "object") + message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} message RemovePpidDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (typeof message.ppidCount === "number") + object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; + else + object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; + return object; + }; + + /** + * Converts this RemovePpidDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemovePpidDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePpidDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus"; + }; + + return RemovePpidDataStatus; + })(); + + 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 27: + 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_AWS_AUTH_FAILED": + case 27: + message.reason = 27; + 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: + case 9: + 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; + case "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": + case 9: + message.reason = 9; + 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_AWS_AUTH_FAILED=27 PROCESSING_ERROR_REASON_AWS_AUTH_FAILED 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[27] = "PROCESSING_ERROR_REASON_AWS_AUTH_FAILED"] = 27; + 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 + * @property {number} PROCESSING_WARNING_REASON_AWS_AUTH_FAILED=9 PROCESSING_WARNING_REASON_AWS_AUTH_FAILED 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; + values[valuesById[9] = "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED"] = 9; + 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; + })(); + + v1.MarketingDataInsightsService = (function() { + + /** + * Constructs a new MarketingDataInsightsService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a MarketingDataInsightsService + * @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 MarketingDataInsightsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MarketingDataInsightsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MarketingDataInsightsService; + + /** + * Creates new MarketingDataInsightsService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @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 {MarketingDataInsightsService} RPC service. Useful where requests and/or responses are streamed. + */ + MarketingDataInsightsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @typedef RetrieveInsightsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} [response] RetrieveInsightsResponse + */ + + /** + * Calls RetrieveInsights. + * @function retrieveInsights + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object + * @param {google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback} callback Node-style callback called with the error, if any, and RetrieveInsightsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingDataInsightsService.prototype.retrieveInsights = function retrieveInsights(request, callback) { + return this.rpcCall(retrieveInsights, $root.google.ads.datamanager.v1.RetrieveInsightsRequest, $root.google.ads.datamanager.v1.RetrieveInsightsResponse, request, callback); + }, "name", { value: "RetrieveInsights" }); + + /** + * Calls RetrieveInsights. + * @function retrieveInsights + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MarketingDataInsightsService; + })(); + + v1.RetrieveInsightsRequest = (function() { + + /** + * Properties of a RetrieveInsightsRequest. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveInsightsRequest + * @property {string|null} [parent] RetrieveInsightsRequest parent + * @property {google.ads.datamanager.v1.IBaseline|null} [baseline] RetrieveInsightsRequest baseline + * @property {string|null} [userListId] RetrieveInsightsRequest userListId + */ + + /** + * Constructs a new RetrieveInsightsRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveInsightsRequest. + * @implements IRetrieveInsightsRequest + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set + */ + function RetrieveInsightsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveInsightsRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.parent = ""; + + /** + * RetrieveInsightsRequest baseline. + * @member {google.ads.datamanager.v1.IBaseline|null|undefined} baseline + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.baseline = null; + + /** + * RetrieveInsightsRequest userListId. + * @member {string} userListId + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.userListId = ""; + + /** + * Creates a new RetrieveInsightsRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest instance + */ + RetrieveInsightsRequest.create = function create(properties) { + return new RetrieveInsightsRequest(properties); + }; + + /** + * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsRequest.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.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + $root.google.ads.datamanager.v1.Baseline.encode(message.baseline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListId); + return writer; + }; + + /** + * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @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.RetrieveInsightsRequest} RetrieveInsightsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsRequest.decode = function decode(reader, 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.RetrieveInsightsRequest(); + 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.baseline = $root.google.ads.datamanager.v1.Baseline.decode(reader, reader.uint32()); + break; + } + case 3: { + message.userListId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveInsightsRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveInsightsRequest.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.baseline != null && message.hasOwnProperty("baseline")) { + var error = $root.google.ads.datamanager.v1.Baseline.verify(message.baseline); + if (error) + return "baseline." + error; + } + if (message.userListId != null && message.hasOwnProperty("userListId")) + if (!$util.isString(message.userListId)) + return "userListId: string expected"; + return null; + }; + + /** + * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest + */ + RetrieveInsightsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsRequest) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.baseline != null) { + if (typeof object.baseline !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsRequest.baseline: object expected"); + message.baseline = $root.google.ads.datamanager.v1.Baseline.fromObject(object.baseline); + } + if (object.userListId != null) + message.userListId = String(object.userListId); + return message; + }; + + /** + * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsRequest} message RetrieveInsightsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveInsightsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.baseline = null; + object.userListId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = $root.google.ads.datamanager.v1.Baseline.toObject(message.baseline, options); + if (message.userListId != null && message.hasOwnProperty("userListId")) + object.userListId = message.userListId; + return object; + }; + + /** + * Converts this RetrieveInsightsRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + * @returns {Object.} JSON object + */ + RetrieveInsightsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveInsightsRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveInsightsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsRequest"; + }; + + return RetrieveInsightsRequest; + })(); + + v1.Baseline = (function() { + + /** + * Properties of a Baseline. + * @memberof google.ads.datamanager.v1 + * @interface IBaseline + * @property {google.ads.datamanager.v1.Baseline.ILocation|null} [baselineLocation] Baseline baselineLocation + * @property {boolean|null} [locationAutoDetectionEnabled] Baseline locationAutoDetectionEnabled + */ + + /** + * Constructs a new Baseline. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a Baseline. + * @implements IBaseline + * @constructor + * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set + */ + function Baseline(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Baseline baselineLocation. + * @member {google.ads.datamanager.v1.Baseline.ILocation|null|undefined} baselineLocation + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Baseline.prototype.baselineLocation = null; + + /** + * Baseline locationAutoDetectionEnabled. + * @member {boolean|null|undefined} locationAutoDetectionEnabled + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Baseline.prototype.locationAutoDetectionEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Baseline baseline. + * @member {"baselineLocation"|"locationAutoDetectionEnabled"|undefined} baseline + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Object.defineProperty(Baseline.prototype, "baseline", { + get: $util.oneOfGetter($oneOfFields = ["baselineLocation", "locationAutoDetectionEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Baseline instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Baseline} Baseline instance + */ + Baseline.create = function create(properties) { + return new Baseline(properties); + }; + + /** + * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Baseline.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baselineLocation != null && Object.hasOwnProperty.call(message, "baselineLocation")) + $root.google.ads.datamanager.v1.Baseline.Location.encode(message.baselineLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.locationAutoDetectionEnabled != null && Object.hasOwnProperty.call(message, "locationAutoDetectionEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.locationAutoDetectionEnabled); + return writer; + }; + + /** + * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Baseline.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Baseline message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Baseline + * @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.Baseline} Baseline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Baseline.decode = function decode(reader, 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.Baseline(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.decode(reader, reader.uint32()); + break; + } + case 2: { + message.locationAutoDetectionEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Baseline message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Baseline} Baseline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Baseline.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Baseline message. + * @function verify + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Baseline.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { + properties.baseline = 1; + { + var error = $root.google.ads.datamanager.v1.Baseline.Location.verify(message.baselineLocation); + if (error) + return "baselineLocation." + error; + } + } + if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { + if (properties.baseline === 1) + return "baseline: multiple values"; + properties.baseline = 1; + if (typeof message.locationAutoDetectionEnabled !== "boolean") + return "locationAutoDetectionEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a Baseline message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Baseline} Baseline + */ + Baseline.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Baseline) + return object; + var message = new $root.google.ads.datamanager.v1.Baseline(); + if (object.baselineLocation != null) { + if (typeof object.baselineLocation !== "object") + throw TypeError(".google.ads.datamanager.v1.Baseline.baselineLocation: object expected"); + message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.fromObject(object.baselineLocation); + } + if (object.locationAutoDetectionEnabled != null) + message.locationAutoDetectionEnabled = Boolean(object.locationAutoDetectionEnabled); + return message; + }; + + /** + * Creates a plain object from a Baseline message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.Baseline} message Baseline + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Baseline.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { + object.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.toObject(message.baselineLocation, options); + if (options.oneofs) + object.baseline = "baselineLocation"; + } + if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { + object.locationAutoDetectionEnabled = message.locationAutoDetectionEnabled; + if (options.oneofs) + object.baseline = "locationAutoDetectionEnabled"; + } + return object; + }; + + /** + * Converts this Baseline to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Baseline + * @instance + * @returns {Object.} JSON object + */ + Baseline.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Baseline + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Baseline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Baseline"; + }; + + Baseline.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.ads.datamanager.v1.Baseline + * @interface ILocation + * @property {Array.|null} [regionCodes] Location regionCodes + */ + + /** + * Constructs a new Location. + * @memberof google.ads.datamanager.v1.Baseline + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.regionCodes = []; + if (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 regionCodes. + * @member {Array.} regionCodes + * @memberof google.ads.datamanager.v1.Baseline.Location + * @instance + */ + Location.prototype.regionCodes = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Baseline.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.regionCodes != null && message.regionCodes.length) + for (var i = 0; i < message.regionCodes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.regionCodes[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location + * @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.Baseline.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.ads.datamanager.v1.Baseline.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.regionCodes && message.regionCodes.length)) + message.regionCodes = []; + message.regionCodes.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.ads.datamanager.v1.Baseline.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.regionCodes != null && message.hasOwnProperty("regionCodes")) { + if (!Array.isArray(message.regionCodes)) + return "regionCodes: array expected"; + for (var i = 0; i < message.regionCodes.length; ++i) + if (!$util.isString(message.regionCodes[i])) + return "regionCodes: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Baseline.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Baseline.Location) + return object; + var message = new $root.google.ads.datamanager.v1.Baseline.Location(); + if (object.regionCodes) { + if (!Array.isArray(object.regionCodes)) + throw TypeError(".google.ads.datamanager.v1.Baseline.Location.regionCodes: array expected"); + message.regionCodes = []; + for (var i = 0; i < object.regionCodes.length; ++i) + message.regionCodes[i] = String(object.regionCodes[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.regionCodes = []; + if (message.regionCodes && message.regionCodes.length) { + object.regionCodes = []; + for (var j = 0; j < message.regionCodes.length; ++j) + object.regionCodes[j] = message.regionCodes[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location"; + }; + + return Location; + })(); + + return Baseline; + })(); + + v1.RetrieveInsightsResponse = (function() { + + /** + * Properties of a RetrieveInsightsResponse. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveInsightsResponse + * @property {Array.|null} [marketingDataInsights] RetrieveInsightsResponse marketingDataInsights + */ + + /** + * Constructs a new RetrieveInsightsResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveInsightsResponse. + * @implements IRetrieveInsightsResponse + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set + */ + function RetrieveInsightsResponse(properties) { + this.marketingDataInsights = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveInsightsResponse marketingDataInsights. + * @member {Array.} marketingDataInsights + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @instance + */ + RetrieveInsightsResponse.prototype.marketingDataInsights = $util.emptyArray; + + /** + * Creates a new RetrieveInsightsResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse instance + */ + RetrieveInsightsResponse.create = function create(properties) { + return new RetrieveInsightsResponse(properties); + }; + + /** + * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.marketingDataInsights != null && message.marketingDataInsights.length) + for (var i = 0; i < message.marketingDataInsights.length; ++i) + $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.encode(message.marketingDataInsights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @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.RetrieveInsightsResponse} RetrieveInsightsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsResponse.decode = function decode(reader, 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.RetrieveInsightsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.marketingDataInsights && message.marketingDataInsights.length)) + message.marketingDataInsights = []; + message.marketingDataInsights.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveInsightsResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveInsightsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.marketingDataInsights != null && message.hasOwnProperty("marketingDataInsights")) { + if (!Array.isArray(message.marketingDataInsights)) + return "marketingDataInsights: array expected"; + for (var i = 0; i < message.marketingDataInsights.length; ++i) { + var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify(message.marketingDataInsights[i]); + if (error) + return "marketingDataInsights." + error; + } + } + return null; + }; + + /** + * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse + */ + RetrieveInsightsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse(); + if (object.marketingDataInsights) { + if (!Array.isArray(object.marketingDataInsights)) + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: array expected"); + message.marketingDataInsights = []; + for (var i = 0; i < object.marketingDataInsights.length; ++i) { + if (typeof object.marketingDataInsights[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: object expected"); + message.marketingDataInsights[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.fromObject(object.marketingDataInsights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} message RetrieveInsightsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveInsightsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.marketingDataInsights = []; + if (message.marketingDataInsights && message.marketingDataInsights.length) { + object.marketingDataInsights = []; + for (var j = 0; j < message.marketingDataInsights.length; ++j) + object.marketingDataInsights[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.toObject(message.marketingDataInsights[j], options); + } + return object; + }; + + /** + * Converts this RetrieveInsightsResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @instance + * @returns {Object.} JSON object + */ + RetrieveInsightsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveInsightsResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveInsightsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse"; + }; + + RetrieveInsightsResponse.MarketingDataInsight = (function() { + + /** + * Properties of a MarketingDataInsight. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @interface IMarketingDataInsight + * @property {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null} [dimension] MarketingDataInsight dimension + * @property {Array.|null} [attributes] MarketingDataInsight attributes + */ + + /** + * Constructs a new MarketingDataInsight. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @classdesc Represents a MarketingDataInsight. + * @implements IMarketingDataInsight + * @constructor + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set + */ + function MarketingDataInsight(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MarketingDataInsight dimension. + * @member {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension} dimension + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + */ + MarketingDataInsight.prototype.dimension = 0; + + /** + * MarketingDataInsight attributes. + * @member {Array.} attributes + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + */ + MarketingDataInsight.prototype.attributes = $util.emptyArray; + + /** + * Creates a new MarketingDataInsight instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight instance + */ + MarketingDataInsight.create = function create(properties) { + return new MarketingDataInsight(properties); + }; + + /** + * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsight.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.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @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.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsight.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimension = reader.int32(); + break; + } + case 2: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarketingDataInsight message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarketingDataInsight.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 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + */ + MarketingDataInsight.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight(); + switch (object.dimension) { + default: + if (typeof object.dimension === "number") { + message.dimension = object.dimension; + break; + } + break; + case "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": + case 0: + message.dimension = 0; + break; + case "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": + case 1: + message.dimension = 1; + break; + case "AFFINITY_USER_INTEREST": + case 2: + message.dimension = 2; + break; + case "IN_MARKET_USER_INTEREST": + case 3: + message.dimension = 3; + break; + case "AGE_RANGE": + case 4: + message.dimension = 4; + break; + case "GENDER": + case 5: + message.dimension = 5; + break; + } + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: object expected"); + message.attributes[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} message MarketingDataInsight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarketingDataInsight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.dimension = options.enums === String ? "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED" : 0; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = options.enums === String ? $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] === undefined ? message.dimension : $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] : message.dimension; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this MarketingDataInsight to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + * @returns {Object.} JSON object + */ + MarketingDataInsight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MarketingDataInsight + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingDataInsight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight"; + }; + + /** + * AudienceInsightsDimension enum. + * @name google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension + * @enum {number} + * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED=0 AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED value + * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN=1 AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN value + * @property {number} AFFINITY_USER_INTEREST=2 AFFINITY_USER_INTEREST value + * @property {number} IN_MARKET_USER_INTEREST=3 IN_MARKET_USER_INTEREST value + * @property {number} AGE_RANGE=4 AGE_RANGE value + * @property {number} GENDER=5 GENDER value + */ + MarketingDataInsight.AudienceInsightsDimension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN"] = 1; + values[valuesById[2] = "AFFINITY_USER_INTEREST"] = 2; + values[valuesById[3] = "IN_MARKET_USER_INTEREST"] = 3; + values[valuesById[4] = "AGE_RANGE"] = 4; + values[valuesById[5] = "GENDER"] = 5; + return values; + })(); + + MarketingDataInsight.MarketingDataInsightsAttribute = (function() { + + /** + * Properties of a MarketingDataInsightsAttribute. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @interface IMarketingDataInsightsAttribute + * @property {number|Long|null} [userInterestId] MarketingDataInsightsAttribute userInterestId + * @property {number|null} [lift] MarketingDataInsightsAttribute lift + * @property {google.ads.datamanager.v1.AgeRange|null} [ageRange] MarketingDataInsightsAttribute ageRange + * @property {google.ads.datamanager.v1.Gender|null} [gender] MarketingDataInsightsAttribute gender + */ + + /** + * Constructs a new MarketingDataInsightsAttribute. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @classdesc Represents a MarketingDataInsightsAttribute. + * @implements IMarketingDataInsightsAttribute + * @constructor + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set + */ + function MarketingDataInsightsAttribute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MarketingDataInsightsAttribute userInterestId. + * @member {number|Long|null|undefined} userInterestId + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.userInterestId = null; + + /** + * MarketingDataInsightsAttribute lift. + * @member {number|null|undefined} lift + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.lift = null; + + /** + * MarketingDataInsightsAttribute ageRange. + * @member {google.ads.datamanager.v1.AgeRange|null|undefined} ageRange + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.ageRange = null; + + /** + * MarketingDataInsightsAttribute gender. + * @member {google.ads.datamanager.v1.Gender|null|undefined} gender + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.gender = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_userInterestId", { + get: $util.oneOfGetter($oneOfFields = ["userInterestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_lift", { + get: $util.oneOfGetter($oneOfFields = ["lift"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_ageRange", { + get: $util.oneOfGetter($oneOfFields = ["ageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_gender", { + get: $util.oneOfGetter($oneOfFields = ["gender"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MarketingDataInsightsAttribute instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute instance + */ + MarketingDataInsightsAttribute.create = function create(properties) { + return new MarketingDataInsightsAttribute(properties); + }; + + /** + * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsightsAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userInterestId != null && Object.hasOwnProperty.call(message, "userInterestId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.userInterestId); + if (message.lift != null && Object.hasOwnProperty.call(message, "lift")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.lift); + if (message.ageRange != null && Object.hasOwnProperty.call(message, "ageRange")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ageRange); + if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.gender); + return writer; + }; + + /** + * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsightsAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsightsAttribute.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userInterestId = reader.int64(); + break; + } + case 2: { + message.lift = reader.float(); + break; + } + case 3: { + message.ageRange = reader.int32(); + break; + } + case 4: { + message.gender = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsightsAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarketingDataInsightsAttribute message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarketingDataInsightsAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { + properties._userInterestId = 1; + if (!$util.isInteger(message.userInterestId) && !(message.userInterestId && $util.isInteger(message.userInterestId.low) && $util.isInteger(message.userInterestId.high))) + return "userInterestId: integer|Long expected"; + } + if (message.lift != null && message.hasOwnProperty("lift")) { + properties._lift = 1; + if (typeof message.lift !== "number") + return "lift: number expected"; + } + if (message.ageRange != null && message.hasOwnProperty("ageRange")) { + properties._ageRange = 1; + switch (message.ageRange) { + default: + return "ageRange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.gender != null && message.hasOwnProperty("gender")) { + properties._gender = 1; + switch (message.gender) { + default: + return "gender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + */ + MarketingDataInsightsAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); + if (object.userInterestId != null) + if ($util.Long) + (message.userInterestId = $util.Long.fromValue(object.userInterestId)).unsigned = false; + else if (typeof object.userInterestId === "string") + message.userInterestId = parseInt(object.userInterestId, 10); + else if (typeof object.userInterestId === "number") + message.userInterestId = object.userInterestId; + else if (typeof object.userInterestId === "object") + message.userInterestId = new $util.LongBits(object.userInterestId.low >>> 0, object.userInterestId.high >>> 0).toNumber(); + if (object.lift != null) + message.lift = Number(object.lift); + switch (object.ageRange) { + default: + if (typeof object.ageRange === "number") { + message.ageRange = object.ageRange; + break; + } + break; + case "AGE_RANGE_UNSPECIFIED": + case 0: + message.ageRange = 0; + break; + case "AGE_RANGE_UNKNOWN": + case 1: + message.ageRange = 1; + break; + case "AGE_RANGE_18_24": + case 2: + message.ageRange = 2; + break; + case "AGE_RANGE_25_34": + case 3: + message.ageRange = 3; + break; + case "AGE_RANGE_35_44": + case 4: + message.ageRange = 4; + break; + case "AGE_RANGE_45_54": + case 5: + message.ageRange = 5; + break; + case "AGE_RANGE_55_64": + case 6: + message.ageRange = 6; + break; + case "AGE_RANGE_65_UP": + case 7: + message.ageRange = 7; + break; + } + switch (object.gender) { + default: + if (typeof object.gender === "number") { + message.gender = object.gender; + break; + } + break; + case "GENDER_UNSPECIFIED": + case 0: + message.gender = 0; + break; + case "GENDER_UNKNOWN": + case 1: + message.gender = 1; + break; + case "GENDER_MALE": + case 2: + message.gender = 2; + break; + case "GENDER_FEMALE": + case 3: + message.gender = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} message MarketingDataInsightsAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarketingDataInsightsAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { + if (typeof message.userInterestId === "number") + object.userInterestId = options.longs === String ? String(message.userInterestId) : message.userInterestId; + else + object.userInterestId = options.longs === String ? $util.Long.prototype.toString.call(message.userInterestId) : options.longs === Number ? new $util.LongBits(message.userInterestId.low >>> 0, message.userInterestId.high >>> 0).toNumber() : message.userInterestId; + if (options.oneofs) + object._userInterestId = "userInterestId"; + } + if (message.lift != null && message.hasOwnProperty("lift")) { + object.lift = options.json && !isFinite(message.lift) ? String(message.lift) : message.lift; + if (options.oneofs) + object._lift = "lift"; + } + if (message.ageRange != null && message.hasOwnProperty("ageRange")) { + object.ageRange = options.enums === String ? $root.google.ads.datamanager.v1.AgeRange[message.ageRange] === undefined ? message.ageRange : $root.google.ads.datamanager.v1.AgeRange[message.ageRange] : message.ageRange; + if (options.oneofs) + object._ageRange = "ageRange"; + } + if (message.gender != null && message.hasOwnProperty("gender")) { + object.gender = options.enums === String ? $root.google.ads.datamanager.v1.Gender[message.gender] === undefined ? message.gender : $root.google.ads.datamanager.v1.Gender[message.gender] : message.gender; + if (options.oneofs) + object._gender = "gender"; + } + return object; + }; + + /** + * Converts this MarketingDataInsightsAttribute to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + * @returns {Object.} JSON object + */ + MarketingDataInsightsAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MarketingDataInsightsAttribute + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingDataInsightsAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute"; + }; + + return MarketingDataInsightsAttribute; + })(); + + return MarketingDataInsight; + })(); + + return RetrieveInsightsResponse; + })(); + + v1.PartnerLinkService = (function() { + + /** + * Constructs a new PartnerLinkService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerLinkService + * @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 PartnerLinkService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PartnerLinkService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PartnerLinkService; + + /** + * Creates new PartnerLinkService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @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 {PartnerLinkService} RPC service. Useful where requests and/or responses are streamed. + */ + PartnerLinkService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef CreatePartnerLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.PartnerLink} [response] PartnerLink + */ + + /** + * Calls CreatePartnerLink. + * @function createPartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback} callback Node-style callback called with the error, if any, and PartnerLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.createPartnerLink = function createPartnerLink(request, callback) { + return this.rpcCall(createPartnerLink, $root.google.ads.datamanager.v1.CreatePartnerLinkRequest, $root.google.ads.datamanager.v1.PartnerLink, request, callback); + }, "name", { value: "CreatePartnerLink" }); + + /** + * Calls CreatePartnerLink. + * @function createPartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef DeletePartnerLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePartnerLink. + * @function deletePartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.deletePartnerLink = function deletePartnerLink(request, callback) { + return this.rpcCall(deletePartnerLink, $root.google.ads.datamanager.v1.DeletePartnerLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePartnerLink" }); + + /** + * Calls DeletePartnerLink. + * @function deletePartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef SearchPartnerLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} [response] SearchPartnerLinksResponse + */ + + /** + * Calls SearchPartnerLinks. + * @function searchPartnerLinks + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback} callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.searchPartnerLinks = function searchPartnerLinks(request, callback) { + return this.rpcCall(searchPartnerLinks, $root.google.ads.datamanager.v1.SearchPartnerLinksRequest, $root.google.ads.datamanager.v1.SearchPartnerLinksResponse, request, callback); + }, "name", { value: "SearchPartnerLinks" }); + + /** + * Calls SearchPartnerLinks. + * @function searchPartnerLinks + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PartnerLinkService; + })(); + + v1.CreatePartnerLinkRequest = (function() { + + /** + * Properties of a CreatePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreatePartnerLinkRequest + * @property {string|null} [parent] CreatePartnerLinkRequest parent + * @property {google.ads.datamanager.v1.IPartnerLink|null} [partnerLink] CreatePartnerLinkRequest partnerLink + */ + + /** + * Constructs a new CreatePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreatePartnerLinkRequest. + * @implements ICreatePartnerLinkRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set + */ + function CreatePartnerLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePartnerLinkRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + */ + CreatePartnerLinkRequest.prototype.parent = ""; + + /** + * CreatePartnerLinkRequest partnerLink. + * @member {google.ads.datamanager.v1.IPartnerLink|null|undefined} partnerLink + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + */ + CreatePartnerLinkRequest.prototype.partnerLink = null; + + /** + * Creates a new CreatePartnerLinkRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest instance + */ + CreatePartnerLinkRequest.create = function create(properties) { + return new CreatePartnerLinkRequest(properties); + }; + + /** + * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartnerLinkRequest.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.partnerLink != null && Object.hasOwnProperty.call(message, "partnerLink")) + $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @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.CreatePartnerLinkRequest} CreatePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartnerLinkRequest.decode = function decode(reader, 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.CreatePartnerLinkRequest(); + 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.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePartnerLinkRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePartnerLinkRequest.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.partnerLink != null && message.hasOwnProperty("partnerLink")) { + var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLink); + if (error) + return "partnerLink." + error; + } + return null; + }; + + /** + * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest + */ + CreatePartnerLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreatePartnerLinkRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreatePartnerLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.partnerLink != null) { + if (typeof object.partnerLink !== "object") + throw TypeError(".google.ads.datamanager.v1.CreatePartnerLinkRequest.partnerLink: object expected"); + message.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLink); + } + return message; + }; + + /** + * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.CreatePartnerLinkRequest} message CreatePartnerLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePartnerLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.partnerLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.partnerLink != null && message.hasOwnProperty("partnerLink")) + object.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLink, options); + return object; + }; + + /** + * Converts this CreatePartnerLinkRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePartnerLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePartnerLinkRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreatePartnerLinkRequest"; + }; + + return CreatePartnerLinkRequest; + })(); + + v1.DeletePartnerLinkRequest = (function() { + + /** + * Properties of a DeletePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @interface IDeletePartnerLinkRequest + * @property {string|null} [name] DeletePartnerLinkRequest name + */ + + /** + * Constructs a new DeletePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a DeletePartnerLinkRequest. + * @implements IDeletePartnerLinkRequest + * @constructor + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set + */ + function DeletePartnerLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePartnerLinkRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @instance + */ + DeletePartnerLinkRequest.prototype.name = ""; + + /** + * Creates a new DeletePartnerLinkRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest instance + */ + DeletePartnerLinkRequest.create = function create(properties) { + return new DeletePartnerLinkRequest(properties); + }; + + /** + * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @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.DeletePartnerLinkRequest} DeletePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartnerLinkRequest.decode = function decode(reader, 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.DeletePartnerLinkRequest(); + 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 DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePartnerLinkRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest + */ + DeletePartnerLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.DeletePartnerLinkRequest) + return object; + var message = new $root.google.ads.datamanager.v1.DeletePartnerLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.DeletePartnerLinkRequest} message DeletePartnerLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePartnerLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePartnerLinkRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.DeletePartnerLinkRequest"; + }; + + return DeletePartnerLinkRequest; + })(); + + v1.SearchPartnerLinksRequest = (function() { + + /** + * Properties of a SearchPartnerLinksRequest. + * @memberof google.ads.datamanager.v1 + * @interface ISearchPartnerLinksRequest + * @property {string|null} [parent] SearchPartnerLinksRequest parent + * @property {number|null} [pageSize] SearchPartnerLinksRequest pageSize + * @property {string|null} [pageToken] SearchPartnerLinksRequest pageToken + * @property {string|null} [filter] SearchPartnerLinksRequest filter + */ + + /** + * Constructs a new SearchPartnerLinksRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SearchPartnerLinksRequest. + * @implements ISearchPartnerLinksRequest + * @constructor + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set + */ + function SearchPartnerLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchPartnerLinksRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.parent = ""; + + /** + * SearchPartnerLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.pageSize = 0; + + /** + * SearchPartnerLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.pageToken = ""; + + /** + * SearchPartnerLinksRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.filter = ""; + + /** + * Creates a new SearchPartnerLinksRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest instance + */ + SearchPartnerLinksRequest.create = function create(properties) { + return new SearchPartnerLinksRequest(properties); + }; + + /** + * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksRequest.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); + return writer; + }; + + /** + * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @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.SearchPartnerLinksRequest} SearchPartnerLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksRequest.decode = function decode(reader, 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.SearchPartnerLinksRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchPartnerLinksRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchPartnerLinksRequest.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"; + return null; + }; + + /** + * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest + */ + SearchPartnerLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksRequest) + return object; + var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.SearchPartnerLinksRequest} message SearchPartnerLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchPartnerLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this SearchPartnerLinksRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + * @returns {Object.} JSON object + */ + SearchPartnerLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchPartnerLinksRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchPartnerLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksRequest"; + }; + + return SearchPartnerLinksRequest; + })(); + + v1.SearchPartnerLinksResponse = (function() { + + /** + * Properties of a SearchPartnerLinksResponse. + * @memberof google.ads.datamanager.v1 + * @interface ISearchPartnerLinksResponse + * @property {Array.|null} [partnerLinks] SearchPartnerLinksResponse partnerLinks + * @property {string|null} [nextPageToken] SearchPartnerLinksResponse nextPageToken + */ + + /** + * Constructs a new SearchPartnerLinksResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SearchPartnerLinksResponse. + * @implements ISearchPartnerLinksResponse + * @constructor + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set + */ + function SearchPartnerLinksResponse(properties) { + this.partnerLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchPartnerLinksResponse partnerLinks. + * @member {Array.} partnerLinks + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + */ + SearchPartnerLinksResponse.prototype.partnerLinks = $util.emptyArray; + + /** + * SearchPartnerLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + */ + SearchPartnerLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchPartnerLinksResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse instance + */ + SearchPartnerLinksResponse.create = function create(properties) { + return new SearchPartnerLinksResponse(properties); + }; + + /** + * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partnerLinks != null && message.partnerLinks.length) + for (var i = 0; i < message.partnerLinks.length; ++i) + $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLinks[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 SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @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.SearchPartnerLinksResponse} SearchPartnerLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksResponse.decode = function decode(reader, 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.SearchPartnerLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.partnerLinks && message.partnerLinks.length)) + message.partnerLinks = []; + message.partnerLinks.push($root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchPartnerLinksResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchPartnerLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partnerLinks != null && message.hasOwnProperty("partnerLinks")) { + if (!Array.isArray(message.partnerLinks)) + return "partnerLinks: array expected"; + for (var i = 0; i < message.partnerLinks.length; ++i) { + var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLinks[i]); + if (error) + return "partnerLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse + */ + SearchPartnerLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksResponse) + return object; + var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksResponse(); + if (object.partnerLinks) { + if (!Array.isArray(object.partnerLinks)) + throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: array expected"); + message.partnerLinks = []; + for (var i = 0; i < object.partnerLinks.length; ++i) { + if (typeof object.partnerLinks[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: object expected"); + message.partnerLinks[i] = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} message SearchPartnerLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchPartnerLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partnerLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partnerLinks && message.partnerLinks.length) { + object.partnerLinks = []; + for (var j = 0; j < message.partnerLinks.length; ++j) + object.partnerLinks[j] = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchPartnerLinksResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + * @returns {Object.} JSON object + */ + SearchPartnerLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchPartnerLinksResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchPartnerLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksResponse"; + }; + + return SearchPartnerLinksResponse; + })(); + + v1.PartnerLink = (function() { + + /** + * Properties of a PartnerLink. + * @memberof google.ads.datamanager.v1 + * @interface IPartnerLink + * @property {string|null} [name] PartnerLink name + * @property {string|null} [partnerLinkId] PartnerLink partnerLinkId + * @property {google.ads.datamanager.v1.IProductAccount|null} [owningAccount] PartnerLink owningAccount + * @property {google.ads.datamanager.v1.IProductAccount|null} [partnerAccount] PartnerLink partnerAccount + */ + + /** + * Constructs a new PartnerLink. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerLink. + * @implements IPartnerLink + * @constructor + * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set + */ + function PartnerLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartnerLink name. + * @member {string} name + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.name = ""; + + /** + * PartnerLink partnerLinkId. + * @member {string} partnerLinkId + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.partnerLinkId = ""; + + /** + * PartnerLink owningAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} owningAccount + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.owningAccount = null; + + /** + * PartnerLink partnerAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} partnerAccount + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.partnerAccount = null; + + /** + * Creates a new PartnerLink instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink instance + */ + PartnerLink.create = function create(properties) { + return new PartnerLink(properties); + }; + + /** + * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerLink.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.partnerLinkId != null && Object.hasOwnProperty.call(message, "partnerLinkId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.partnerLinkId); + if (message.owningAccount != null && Object.hasOwnProperty.call(message, "owningAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.owningAccount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partnerAccount != null && Object.hasOwnProperty.call(message, "partnerAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.partnerAccount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartnerLink message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PartnerLink + * @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.PartnerLink} PartnerLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerLink.decode = function decode(reader, 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.PartnerLink(); + 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.partnerLinkId = reader.string(); + break; + } + case 3: { + message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + case 4: { + message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartnerLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartnerLink message. + * @function verify + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartnerLink.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.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) + if (!$util.isString(message.partnerLinkId)) + return "partnerLinkId: string expected"; + if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.owningAccount); + if (error) + return "owningAccount." + error; + } + if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.partnerAccount); + if (error) + return "partnerAccount." + error; + } + return null; + }; + + /** + * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink + */ + PartnerLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PartnerLink) + return object; + var message = new $root.google.ads.datamanager.v1.PartnerLink(); + if (object.name != null) + message.name = String(object.name); + if (object.partnerLinkId != null) + message.partnerLinkId = String(object.partnerLinkId); + if (object.owningAccount != null) { + if (typeof object.owningAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.PartnerLink.owningAccount: object expected"); + message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.owningAccount); + } + if (object.partnerAccount != null) { + if (typeof object.partnerAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.PartnerLink.partnerAccount: object expected"); + message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.partnerAccount); + } + return message; + }; + + /** + * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.PartnerLink} message PartnerLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartnerLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.partnerLinkId = ""; + object.owningAccount = null; + object.partnerAccount = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) + object.partnerLinkId = message.partnerLinkId; + if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) + object.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.owningAccount, options); + if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) + object.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.partnerAccount, options); + return object; + }; + + /** + * Converts this PartnerLink to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + * @returns {Object.} JSON object + */ + PartnerLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartnerLink + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartnerLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerLink"; + }; + + return PartnerLink; + })(); + + v1.UserList = (function() { + + /** + * Properties of a UserList. + * @memberof google.ads.datamanager.v1 + * @interface IUserList + * @property {string|null} [name] UserList name + * @property {number|Long|null} [id] UserList id + * @property {boolean|null} [readOnly] UserList readOnly + * @property {string|null} [displayName] UserList displayName + * @property {string|null} [description] UserList description + * @property {google.ads.datamanager.v1.UserList.MembershipStatus|null} [membershipStatus] UserList membershipStatus + * @property {string|null} [integrationCode] UserList integrationCode + * @property {google.protobuf.IDuration|null} [membershipDuration] UserList membershipDuration + * @property {google.ads.datamanager.v1.UserList.ClosingReason|null} [closingReason] UserList closingReason + * @property {google.ads.datamanager.v1.UserList.AccessReason|null} [accessReason] UserList accessReason + * @property {google.ads.datamanager.v1.UserList.AccessStatus|null} [accountAccessStatus] UserList accountAccessStatus + * @property {google.ads.datamanager.v1.ISizeInfo|null} [sizeInfo] UserList sizeInfo + * @property {google.ads.datamanager.v1.ITargetNetworkInfo|null} [targetNetworkInfo] UserList targetNetworkInfo + * @property {google.ads.datamanager.v1.IIngestedUserListInfo|null} [ingestedUserListInfo] UserList ingestedUserListInfo + */ + + /** + * Constructs a new UserList. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserList. + * @implements IUserList + * @constructor + * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set + */ + function UserList(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserList name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.name = ""; + + /** + * UserList id. + * @member {number|Long} id + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserList readOnly. + * @member {boolean} readOnly + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.readOnly = false; + + /** + * UserList displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.displayName = null; + + /** + * UserList description. + * @member {string|null|undefined} description + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.description = null; + + /** + * UserList membershipStatus. + * @member {google.ads.datamanager.v1.UserList.MembershipStatus|null|undefined} membershipStatus + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.membershipStatus = null; + + /** + * UserList integrationCode. + * @member {string|null|undefined} integrationCode + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.integrationCode = null; + + /** + * UserList membershipDuration. + * @member {google.protobuf.IDuration|null|undefined} membershipDuration + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.membershipDuration = null; + + /** + * UserList closingReason. + * @member {google.ads.datamanager.v1.UserList.ClosingReason|null|undefined} closingReason + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.closingReason = null; + + /** + * UserList accessReason. + * @member {google.ads.datamanager.v1.UserList.AccessReason} accessReason + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.accessReason = 0; + + /** + * UserList accountAccessStatus. + * @member {google.ads.datamanager.v1.UserList.AccessStatus|null|undefined} accountAccessStatus + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.accountAccessStatus = null; + + /** + * UserList sizeInfo. + * @member {google.ads.datamanager.v1.ISizeInfo|null|undefined} sizeInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.sizeInfo = null; + + /** + * UserList targetNetworkInfo. + * @member {google.ads.datamanager.v1.ITargetNetworkInfo|null|undefined} targetNetworkInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.targetNetworkInfo = null; + + /** + * UserList ingestedUserListInfo. + * @member {google.ads.datamanager.v1.IIngestedUserListInfo|null|undefined} ingestedUserListInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.ingestedUserListInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_membershipStatus", { + get: $util.oneOfGetter($oneOfFields = ["membershipStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_integrationCode", { + get: $util.oneOfGetter($oneOfFields = ["integrationCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_closingReason", { + get: $util.oneOfGetter($oneOfFields = ["closingReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_accountAccessStatus", { + get: $util.oneOfGetter($oneOfFields = ["accountAccessStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UserList userListInfo. + * @member {"ingestedUserListInfo"|undefined} userListInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + Object.defineProperty(UserList.prototype, "userListInfo", { + get: $util.oneOfGetter($oneOfFields = ["ingestedUserListInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserList instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserList} UserList instance + */ + UserList.create = function create(properties) { + return new UserList(properties); + }; + + /** + * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserList.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); + if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.readOnly); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.membershipStatus != null && Object.hasOwnProperty.call(message, "membershipStatus")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.membershipStatus); + if (message.integrationCode != null && Object.hasOwnProperty.call(message, "integrationCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.integrationCode); + if (message.membershipDuration != null && Object.hasOwnProperty.call(message, "membershipDuration")) + $root.google.protobuf.Duration.encode(message.membershipDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.closingReason != null && Object.hasOwnProperty.call(message, "closingReason")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.closingReason); + if (message.accessReason != null && Object.hasOwnProperty.call(message, "accessReason")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.accessReason); + if (message.accountAccessStatus != null && Object.hasOwnProperty.call(message, "accountAccessStatus")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.accountAccessStatus); + if (message.sizeInfo != null && Object.hasOwnProperty.call(message, "sizeInfo")) + $root.google.ads.datamanager.v1.SizeInfo.encode(message.sizeInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.targetNetworkInfo != null && Object.hasOwnProperty.call(message, "targetNetworkInfo")) + $root.google.ads.datamanager.v1.TargetNetworkInfo.encode(message.targetNetworkInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.ingestedUserListInfo != null && Object.hasOwnProperty.call(message, "ingestedUserListInfo")) + $root.google.ads.datamanager.v1.IngestedUserListInfo.encode(message.ingestedUserListInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserList + * @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.UserList} UserList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserList.decode = function decode(reader, 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.UserList(); + 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.id = reader.int64(); + break; + } + case 3: { + message.readOnly = reader.bool(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.membershipStatus = reader.int32(); + break; + } + case 7: { + message.integrationCode = reader.string(); + break; + } + case 8: { + message.membershipDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.closingReason = reader.int32(); + break; + } + case 10: { + message.accessReason = reader.int32(); + break; + } + case 11: { + message.accountAccessStatus = reader.int32(); + break; + } + case 12: { + message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserList} UserList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserList message. + * @function verify + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserList.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.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + if (typeof message.readOnly !== "boolean") + return "readOnly: boolean 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { + properties._membershipStatus = 1; + switch (message.membershipStatus) { + default: + return "membershipStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { + properties._integrationCode = 1; + if (!$util.isString(message.integrationCode)) + return "integrationCode: string expected"; + } + if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) { + var error = $root.google.protobuf.Duration.verify(message.membershipDuration); + if (error) + return "membershipDuration." + error; + } + if (message.closingReason != null && message.hasOwnProperty("closingReason")) { + properties._closingReason = 1; + switch (message.closingReason) { + default: + return "closingReason: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.accessReason != null && message.hasOwnProperty("accessReason")) + switch (message.accessReason) { + default: + return "accessReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { + properties._accountAccessStatus = 1; + switch (message.accountAccessStatus) { + default: + return "accountAccessStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) { + var error = $root.google.ads.datamanager.v1.SizeInfo.verify(message.sizeInfo); + if (error) + return "sizeInfo." + error; + } + if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) { + var error = $root.google.ads.datamanager.v1.TargetNetworkInfo.verify(message.targetNetworkInfo); + if (error) + return "targetNetworkInfo." + error; + } + if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { + properties.userListInfo = 1; + { + var error = $root.google.ads.datamanager.v1.IngestedUserListInfo.verify(message.ingestedUserListInfo); + if (error) + return "ingestedUserListInfo." + error; + } + } + return null; + }; + + /** + * Creates a UserList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserList} UserList + */ + UserList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserList) + return object; + var message = new $root.google.ads.datamanager.v1.UserList(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.readOnly != null) + message.readOnly = Boolean(object.readOnly); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.membershipStatus) { + default: + if (typeof object.membershipStatus === "number") { + message.membershipStatus = object.membershipStatus; + break; + } + break; + case "MEMBERSHIP_STATUS_UNSPECIFIED": + case 0: + message.membershipStatus = 0; + break; + case "OPEN": + case 1: + message.membershipStatus = 1; + break; + case "CLOSED": + case 2: + message.membershipStatus = 2; + break; + } + if (object.integrationCode != null) + message.integrationCode = String(object.integrationCode); + if (object.membershipDuration != null) { + if (typeof object.membershipDuration !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.membershipDuration: object expected"); + message.membershipDuration = $root.google.protobuf.Duration.fromObject(object.membershipDuration); + } + switch (object.closingReason) { + default: + if (typeof object.closingReason === "number") { + message.closingReason = object.closingReason; + break; + } + break; + case "CLOSING_REASON_UNSPECIFIED": + case 0: + message.closingReason = 0; + break; + case "UNUSED": + case 1: + message.closingReason = 1; + break; + } + switch (object.accessReason) { + default: + if (typeof object.accessReason === "number") { + message.accessReason = object.accessReason; + break; + } + break; + case "ACCESS_REASON_UNSPECIFIED": + case 0: + message.accessReason = 0; + break; + case "OWNED": + case 1: + message.accessReason = 1; + break; + case "SHARED": + case 2: + message.accessReason = 2; + break; + case "LICENSED": + case 3: + message.accessReason = 3; + break; + case "SUBSCRIBED": + case 4: + message.accessReason = 4; + break; + case "AFFILIATED": + case 5: + message.accessReason = 5; + break; + } + switch (object.accountAccessStatus) { + default: + if (typeof object.accountAccessStatus === "number") { + message.accountAccessStatus = object.accountAccessStatus; + break; + } + break; + case "ACCESS_STATUS_UNSPECIFIED": + case 0: + message.accountAccessStatus = 0; + break; + case "ENABLED": + case 1: + message.accountAccessStatus = 1; + break; + case "DISABLED": + case 2: + message.accountAccessStatus = 2; + break; + } + if (object.sizeInfo != null) { + if (typeof object.sizeInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.sizeInfo: object expected"); + message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.fromObject(object.sizeInfo); + } + if (object.targetNetworkInfo != null) { + if (typeof object.targetNetworkInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.targetNetworkInfo: object expected"); + message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.fromObject(object.targetNetworkInfo); + } + if (object.ingestedUserListInfo != null) { + if (typeof object.ingestedUserListInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.ingestedUserListInfo: object expected"); + message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.fromObject(object.ingestedUserListInfo); + } + return message; + }; + + /** + * Creates a plain object from a UserList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.UserList} message UserList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserList.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.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + object.readOnly = false; + object.membershipDuration = null; + object.accessReason = options.enums === String ? "ACCESS_REASON_UNSPECIFIED" : 0; + object.sizeInfo = null; + object.targetNetworkInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + object.readOnly = message.readOnly; + 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { + object.membershipStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] === undefined ? message.membershipStatus : $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] : message.membershipStatus; + if (options.oneofs) + object._membershipStatus = "membershipStatus"; + } + if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { + object.integrationCode = message.integrationCode; + if (options.oneofs) + object._integrationCode = "integrationCode"; + } + if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) + object.membershipDuration = $root.google.protobuf.Duration.toObject(message.membershipDuration, options); + if (message.closingReason != null && message.hasOwnProperty("closingReason")) { + object.closingReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] === undefined ? message.closingReason : $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] : message.closingReason; + if (options.oneofs) + object._closingReason = "closingReason"; + } + if (message.accessReason != null && message.hasOwnProperty("accessReason")) + object.accessReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] === undefined ? message.accessReason : $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] : message.accessReason; + if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { + object.accountAccessStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] === undefined ? message.accountAccessStatus : $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] : message.accountAccessStatus; + if (options.oneofs) + object._accountAccessStatus = "accountAccessStatus"; + } + if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) + object.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.toObject(message.sizeInfo, options); + if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) + object.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.toObject(message.targetNetworkInfo, options); + if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { + object.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.toObject(message.ingestedUserListInfo, options); + if (options.oneofs) + object.userListInfo = "ingestedUserListInfo"; + } + return object; + }; + + /** + * Converts this UserList to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserList + * @instance + * @returns {Object.} JSON object + */ + UserList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserList + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserList"; + }; + + /** + * MembershipStatus enum. + * @name google.ads.datamanager.v1.UserList.MembershipStatus + * @enum {number} + * @property {number} MEMBERSHIP_STATUS_UNSPECIFIED=0 MEMBERSHIP_STATUS_UNSPECIFIED value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + UserList.MembershipStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEMBERSHIP_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * ClosingReason enum. + * @name google.ads.datamanager.v1.UserList.ClosingReason + * @enum {number} + * @property {number} CLOSING_REASON_UNSPECIFIED=0 CLOSING_REASON_UNSPECIFIED value + * @property {number} UNUSED=1 UNUSED value + */ + UserList.ClosingReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOSING_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNUSED"] = 1; + return values; + })(); + + /** + * AccessReason enum. + * @name google.ads.datamanager.v1.UserList.AccessReason + * @enum {number} + * @property {number} ACCESS_REASON_UNSPECIFIED=0 ACCESS_REASON_UNSPECIFIED value + * @property {number} OWNED=1 OWNED value + * @property {number} SHARED=2 SHARED value + * @property {number} LICENSED=3 LICENSED value + * @property {number} SUBSCRIBED=4 SUBSCRIBED value + * @property {number} AFFILIATED=5 AFFILIATED value + */ + UserList.AccessReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "OWNED"] = 1; + values[valuesById[2] = "SHARED"] = 2; + values[valuesById[3] = "LICENSED"] = 3; + values[valuesById[4] = "SUBSCRIBED"] = 4; + values[valuesById[5] = "AFFILIATED"] = 5; + return values; + })(); + + /** + * AccessStatus enum. + * @name google.ads.datamanager.v1.UserList.AccessStatus + * @enum {number} + * @property {number} ACCESS_STATUS_UNSPECIFIED=0 ACCESS_STATUS_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + UserList.AccessStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + return UserList; + })(); + + v1.SizeInfo = (function() { + + /** + * Properties of a SizeInfo. + * @memberof google.ads.datamanager.v1 + * @interface ISizeInfo + * @property {number|Long|null} [displayNetworkMembersCount] SizeInfo displayNetworkMembersCount + * @property {number|Long|null} [searchNetworkMembersCount] SizeInfo searchNetworkMembersCount + */ + + /** + * Constructs a new SizeInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SizeInfo. + * @implements ISizeInfo + * @constructor + * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set + */ + function SizeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SizeInfo displayNetworkMembersCount. + * @member {number|Long} displayNetworkMembersCount + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + */ + SizeInfo.prototype.displayNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SizeInfo searchNetworkMembersCount. + * @member {number|Long} searchNetworkMembersCount + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + */ + SizeInfo.prototype.searchNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SizeInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo instance + */ + SizeInfo.create = function create(properties) { + return new SizeInfo(properties); + }; + + /** + * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SizeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayNetworkMembersCount != null && Object.hasOwnProperty.call(message, "displayNetworkMembersCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.displayNetworkMembersCount); + if (message.searchNetworkMembersCount != null && Object.hasOwnProperty.call(message, "searchNetworkMembersCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.searchNetworkMembersCount); + return writer; + }; + + /** + * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SizeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SizeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SizeInfo + * @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.SizeInfo} SizeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SizeInfo.decode = function decode(reader, 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.SizeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayNetworkMembersCount = reader.int64(); + break; + } + case 2: { + message.searchNetworkMembersCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SizeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SizeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SizeInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SizeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) + if (!$util.isInteger(message.displayNetworkMembersCount) && !(message.displayNetworkMembersCount && $util.isInteger(message.displayNetworkMembersCount.low) && $util.isInteger(message.displayNetworkMembersCount.high))) + return "displayNetworkMembersCount: integer|Long expected"; + if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) + if (!$util.isInteger(message.searchNetworkMembersCount) && !(message.searchNetworkMembersCount && $util.isInteger(message.searchNetworkMembersCount.low) && $util.isInteger(message.searchNetworkMembersCount.high))) + return "searchNetworkMembersCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo + */ + SizeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SizeInfo) + return object; + var message = new $root.google.ads.datamanager.v1.SizeInfo(); + if (object.displayNetworkMembersCount != null) + if ($util.Long) + (message.displayNetworkMembersCount = $util.Long.fromValue(object.displayNetworkMembersCount)).unsigned = false; + else if (typeof object.displayNetworkMembersCount === "string") + message.displayNetworkMembersCount = parseInt(object.displayNetworkMembersCount, 10); + else if (typeof object.displayNetworkMembersCount === "number") + message.displayNetworkMembersCount = object.displayNetworkMembersCount; + else if (typeof object.displayNetworkMembersCount === "object") + message.displayNetworkMembersCount = new $util.LongBits(object.displayNetworkMembersCount.low >>> 0, object.displayNetworkMembersCount.high >>> 0).toNumber(); + if (object.searchNetworkMembersCount != null) + if ($util.Long) + (message.searchNetworkMembersCount = $util.Long.fromValue(object.searchNetworkMembersCount)).unsigned = false; + else if (typeof object.searchNetworkMembersCount === "string") + message.searchNetworkMembersCount = parseInt(object.searchNetworkMembersCount, 10); + else if (typeof object.searchNetworkMembersCount === "number") + message.searchNetworkMembersCount = object.searchNetworkMembersCount; + else if (typeof object.searchNetworkMembersCount === "object") + message.searchNetworkMembersCount = new $util.LongBits(object.searchNetworkMembersCount.low >>> 0, object.searchNetworkMembersCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.SizeInfo} message SizeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SizeInfo.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.displayNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.displayNetworkMembersCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.searchNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.searchNetworkMembersCount = options.longs === String ? "0" : 0; + } + if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) + if (typeof message.displayNetworkMembersCount === "number") + object.displayNetworkMembersCount = options.longs === String ? String(message.displayNetworkMembersCount) : message.displayNetworkMembersCount; + else + object.displayNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.displayNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.displayNetworkMembersCount.low >>> 0, message.displayNetworkMembersCount.high >>> 0).toNumber() : message.displayNetworkMembersCount; + if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) + if (typeof message.searchNetworkMembersCount === "number") + object.searchNetworkMembersCount = options.longs === String ? String(message.searchNetworkMembersCount) : message.searchNetworkMembersCount; + else + object.searchNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.searchNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.searchNetworkMembersCount.low >>> 0, message.searchNetworkMembersCount.high >>> 0).toNumber() : message.searchNetworkMembersCount; + return object; + }; + + /** + * Converts this SizeInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + * @returns {Object.} JSON object + */ + SizeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SizeInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SizeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SizeInfo"; + }; + + return SizeInfo; + })(); + + v1.TargetNetworkInfo = (function() { + + /** + * Properties of a TargetNetworkInfo. + * @memberof google.ads.datamanager.v1 + * @interface ITargetNetworkInfo + * @property {boolean|null} [eligibleForDisplay] TargetNetworkInfo eligibleForDisplay + * @property {boolean|null} [eligibleForSearch] TargetNetworkInfo eligibleForSearch + */ + + /** + * Constructs a new TargetNetworkInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a TargetNetworkInfo. + * @implements ITargetNetworkInfo + * @constructor + * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set + */ + function TargetNetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetNetworkInfo eligibleForDisplay. + * @member {boolean} eligibleForDisplay + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + */ + TargetNetworkInfo.prototype.eligibleForDisplay = false; + + /** + * TargetNetworkInfo eligibleForSearch. + * @member {boolean|null|undefined} eligibleForSearch + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + */ + TargetNetworkInfo.prototype.eligibleForSearch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TargetNetworkInfo.prototype, "_eligibleForSearch", { + get: $util.oneOfGetter($oneOfFields = ["eligibleForSearch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetNetworkInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo instance + */ + TargetNetworkInfo.create = function create(properties) { + return new TargetNetworkInfo(properties); + }; + + /** + * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eligibleForDisplay != null && Object.hasOwnProperty.call(message, "eligibleForDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.eligibleForDisplay); + if (message.eligibleForSearch != null && Object.hasOwnProperty.call(message, "eligibleForSearch")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eligibleForSearch); + return writer; + }; + + /** + * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @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.TargetNetworkInfo} TargetNetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNetworkInfo.decode = function decode(reader, 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.TargetNetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eligibleForDisplay = reader.bool(); + break; + } + case 2: { + message.eligibleForSearch = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetNetworkInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetNetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) + if (typeof message.eligibleForDisplay !== "boolean") + return "eligibleForDisplay: boolean expected"; + if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { + properties._eligibleForSearch = 1; + if (typeof message.eligibleForSearch !== "boolean") + return "eligibleForSearch: boolean expected"; + } + return null; + }; + + /** + * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo + */ + TargetNetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.TargetNetworkInfo) + return object; + var message = new $root.google.ads.datamanager.v1.TargetNetworkInfo(); + if (object.eligibleForDisplay != null) + message.eligibleForDisplay = Boolean(object.eligibleForDisplay); + if (object.eligibleForSearch != null) + message.eligibleForSearch = Boolean(object.eligibleForSearch); + return message; + }; + + /** + * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.TargetNetworkInfo} message TargetNetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetNetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.eligibleForDisplay = false; + if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) + object.eligibleForDisplay = message.eligibleForDisplay; + if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { + object.eligibleForSearch = message.eligibleForSearch; + if (options.oneofs) + object._eligibleForSearch = "eligibleForSearch"; + } + return object; + }; + + /** + * Converts this TargetNetworkInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + * @returns {Object.} JSON object + */ + TargetNetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetNetworkInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetNetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.TargetNetworkInfo"; + }; + + return TargetNetworkInfo; + })(); + + v1.IngestedUserListInfo = (function() { + + /** + * Properties of an IngestedUserListInfo. + * @memberof google.ads.datamanager.v1 + * @interface IIngestedUserListInfo + * @property {Array.|null} [uploadKeyTypes] IngestedUserListInfo uploadKeyTypes + * @property {google.ads.datamanager.v1.IContactIdInfo|null} [contactIdInfo] IngestedUserListInfo contactIdInfo + * @property {google.ads.datamanager.v1.IMobileIdInfo|null} [mobileIdInfo] IngestedUserListInfo mobileIdInfo + * @property {google.ads.datamanager.v1.IUserIdInfo|null} [userIdInfo] IngestedUserListInfo userIdInfo + * @property {google.ads.datamanager.v1.IPairIdInfo|null} [pairIdInfo] IngestedUserListInfo pairIdInfo + * @property {google.ads.datamanager.v1.IPseudonymousIdInfo|null} [pseudonymousIdInfo] IngestedUserListInfo pseudonymousIdInfo + * @property {google.ads.datamanager.v1.IPartnerAudienceInfo|null} [partnerAudienceInfo] IngestedUserListInfo partnerAudienceInfo + */ + + /** + * Constructs a new IngestedUserListInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestedUserListInfo. + * @implements IIngestedUserListInfo + * @constructor + * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set + */ + function IngestedUserListInfo(properties) { + this.uploadKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestedUserListInfo uploadKeyTypes. + * @member {Array.} uploadKeyTypes + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.uploadKeyTypes = $util.emptyArray; + + /** + * IngestedUserListInfo contactIdInfo. + * @member {google.ads.datamanager.v1.IContactIdInfo|null|undefined} contactIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.contactIdInfo = null; + + /** + * IngestedUserListInfo mobileIdInfo. + * @member {google.ads.datamanager.v1.IMobileIdInfo|null|undefined} mobileIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.mobileIdInfo = null; + + /** + * IngestedUserListInfo userIdInfo. + * @member {google.ads.datamanager.v1.IUserIdInfo|null|undefined} userIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.userIdInfo = null; + + /** + * IngestedUserListInfo pairIdInfo. + * @member {google.ads.datamanager.v1.IPairIdInfo|null|undefined} pairIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.pairIdInfo = null; + + /** + * IngestedUserListInfo pseudonymousIdInfo. + * @member {google.ads.datamanager.v1.IPseudonymousIdInfo|null|undefined} pseudonymousIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.pseudonymousIdInfo = null; + + /** + * IngestedUserListInfo partnerAudienceInfo. + * @member {google.ads.datamanager.v1.IPartnerAudienceInfo|null|undefined} partnerAudienceInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.partnerAudienceInfo = null; + + /** + * Creates a new IngestedUserListInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo instance + */ + IngestedUserListInfo.create = function create(properties) { + return new IngestedUserListInfo(properties); + }; + + /** + * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestedUserListInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uploadKeyTypes != null && message.uploadKeyTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.uploadKeyTypes.length; ++i) + writer.int32(message.uploadKeyTypes[i]); + writer.ldelim(); + } + if (message.contactIdInfo != null && Object.hasOwnProperty.call(message, "contactIdInfo")) + $root.google.ads.datamanager.v1.ContactIdInfo.encode(message.contactIdInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobileIdInfo != null && Object.hasOwnProperty.call(message, "mobileIdInfo")) + $root.google.ads.datamanager.v1.MobileIdInfo.encode(message.mobileIdInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.userIdInfo != null && Object.hasOwnProperty.call(message, "userIdInfo")) + $root.google.ads.datamanager.v1.UserIdInfo.encode(message.userIdInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pairIdInfo != null && Object.hasOwnProperty.call(message, "pairIdInfo")) + $root.google.ads.datamanager.v1.PairIdInfo.encode(message.pairIdInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pseudonymousIdInfo != null && Object.hasOwnProperty.call(message, "pseudonymousIdInfo")) + $root.google.ads.datamanager.v1.PseudonymousIdInfo.encode(message.pseudonymousIdInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.partnerAudienceInfo != null && Object.hasOwnProperty.call(message, "partnerAudienceInfo")) + $root.google.ads.datamanager.v1.PartnerAudienceInfo.encode(message.partnerAudienceInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestedUserListInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @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.IngestedUserListInfo} IngestedUserListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestedUserListInfo.decode = function decode(reader, 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.IngestedUserListInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.uploadKeyTypes && message.uploadKeyTypes.length)) + message.uploadKeyTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.uploadKeyTypes.push(reader.int32()); + } else + message.uploadKeyTypes.push(reader.int32()); + break; + } + case 2: { + message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestedUserListInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestedUserListInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestedUserListInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uploadKeyTypes != null && message.hasOwnProperty("uploadKeyTypes")) { + if (!Array.isArray(message.uploadKeyTypes)) + return "uploadKeyTypes: array expected"; + for (var i = 0; i < message.uploadKeyTypes.length; ++i) + switch (message.uploadKeyTypes[i]) { + default: + return "uploadKeyTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) { + var error = $root.google.ads.datamanager.v1.ContactIdInfo.verify(message.contactIdInfo); + if (error) + return "contactIdInfo." + error; + } + if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) { + var error = $root.google.ads.datamanager.v1.MobileIdInfo.verify(message.mobileIdInfo); + if (error) + return "mobileIdInfo." + error; + } + if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) { + var error = $root.google.ads.datamanager.v1.UserIdInfo.verify(message.userIdInfo); + if (error) + return "userIdInfo." + error; + } + if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) { + var error = $root.google.ads.datamanager.v1.PairIdInfo.verify(message.pairIdInfo); + if (error) + return "pairIdInfo." + error; + } + if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) { + var error = $root.google.ads.datamanager.v1.PseudonymousIdInfo.verify(message.pseudonymousIdInfo); + if (error) + return "pseudonymousIdInfo." + error; + } + if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) { + var error = $root.google.ads.datamanager.v1.PartnerAudienceInfo.verify(message.partnerAudienceInfo); + if (error) + return "partnerAudienceInfo." + error; + } + return null; + }; + + /** + * Creates an IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo + */ + IngestedUserListInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestedUserListInfo) + return object; + var message = new $root.google.ads.datamanager.v1.IngestedUserListInfo(); + if (object.uploadKeyTypes) { + if (!Array.isArray(object.uploadKeyTypes)) + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.uploadKeyTypes: array expected"); + message.uploadKeyTypes = []; + for (var i = 0; i < object.uploadKeyTypes.length; ++i) + switch (object.uploadKeyTypes[i]) { + default: + if (typeof object.uploadKeyTypes[i] === "number") { + message.uploadKeyTypes[i] = object.uploadKeyTypes[i]; + break; + } + case "UPLOAD_KEY_TYPE_UNSPECIFIED": + case 0: + message.uploadKeyTypes[i] = 0; + break; + case "CONTACT_ID": + case 1: + message.uploadKeyTypes[i] = 1; + break; + case "MOBILE_ID": + case 2: + message.uploadKeyTypes[i] = 2; + break; + case "USER_ID": + case 3: + message.uploadKeyTypes[i] = 3; + break; + case "PAIR_ID": + case 4: + message.uploadKeyTypes[i] = 4; + break; + case "PSEUDONYMOUS_ID": + case 5: + message.uploadKeyTypes[i] = 5; + break; + } + } + if (object.contactIdInfo != null) { + if (typeof object.contactIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.contactIdInfo: object expected"); + message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.fromObject(object.contactIdInfo); + } + if (object.mobileIdInfo != null) { + if (typeof object.mobileIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.mobileIdInfo: object expected"); + message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.fromObject(object.mobileIdInfo); + } + if (object.userIdInfo != null) { + if (typeof object.userIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.userIdInfo: object expected"); + message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.fromObject(object.userIdInfo); + } + if (object.pairIdInfo != null) { + if (typeof object.pairIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pairIdInfo: object expected"); + message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.fromObject(object.pairIdInfo); + } + if (object.pseudonymousIdInfo != null) { + if (typeof object.pseudonymousIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pseudonymousIdInfo: object expected"); + message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.fromObject(object.pseudonymousIdInfo); + } + if (object.partnerAudienceInfo != null) { + if (typeof object.partnerAudienceInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.partnerAudienceInfo: object expected"); + message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.fromObject(object.partnerAudienceInfo); + } + return message; + }; + + /** + * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IngestedUserListInfo} message IngestedUserListInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestedUserListInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uploadKeyTypes = []; + if (options.defaults) { + object.contactIdInfo = null; + object.mobileIdInfo = null; + object.userIdInfo = null; + object.pairIdInfo = null; + object.pseudonymousIdInfo = null; + object.partnerAudienceInfo = null; + } + if (message.uploadKeyTypes && message.uploadKeyTypes.length) { + object.uploadKeyTypes = []; + for (var j = 0; j < message.uploadKeyTypes.length; ++j) + object.uploadKeyTypes[j] = options.enums === String ? $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] === undefined ? message.uploadKeyTypes[j] : $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] : message.uploadKeyTypes[j]; + } + if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) + object.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.toObject(message.contactIdInfo, options); + if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) + object.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.toObject(message.mobileIdInfo, options); + if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) + object.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.toObject(message.userIdInfo, options); + if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) + object.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.toObject(message.pairIdInfo, options); + if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) + object.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.toObject(message.pseudonymousIdInfo, options); + if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) + object.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.toObject(message.partnerAudienceInfo, options); + return object; + }; + + /** + * Converts this IngestedUserListInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + * @returns {Object.} JSON object + */ + IngestedUserListInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestedUserListInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestedUserListInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestedUserListInfo"; + }; + + /** + * UploadKeyType enum. + * @name google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType + * @enum {number} + * @property {number} UPLOAD_KEY_TYPE_UNSPECIFIED=0 UPLOAD_KEY_TYPE_UNSPECIFIED value + * @property {number} CONTACT_ID=1 CONTACT_ID value + * @property {number} MOBILE_ID=2 MOBILE_ID value + * @property {number} USER_ID=3 USER_ID value + * @property {number} PAIR_ID=4 PAIR_ID value + * @property {number} PSEUDONYMOUS_ID=5 PSEUDONYMOUS_ID value + */ + IngestedUserListInfo.UploadKeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPLOAD_KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTACT_ID"] = 1; + values[valuesById[2] = "MOBILE_ID"] = 2; + values[valuesById[3] = "USER_ID"] = 3; + values[valuesById[4] = "PAIR_ID"] = 4; + values[valuesById[5] = "PSEUDONYMOUS_ID"] = 5; + return values; + })(); + + return IngestedUserListInfo; + })(); + + v1.ContactIdInfo = (function() { + + /** + * Properties of a ContactIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IContactIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] ContactIdInfo dataSourceType + * @property {number|null} [matchRatePercentage] ContactIdInfo matchRatePercentage + */ + + /** + * Constructs a new ContactIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ContactIdInfo. + * @implements IContactIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set + */ + function ContactIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContactIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + */ + ContactIdInfo.prototype.dataSourceType = null; + + /** + * ContactIdInfo matchRatePercentage. + * @member {number} matchRatePercentage + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + */ + ContactIdInfo.prototype.matchRatePercentage = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContactIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo instance + */ + ContactIdInfo.create = function create(properties) { + return new ContactIdInfo(properties); + }; + + /** + * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchRatePercentage); + return writer; + }; + + /** + * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @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.ContactIdInfo} ContactIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactIdInfo.decode = function decode(reader, 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.ContactIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + case 2: { + message.matchRatePercentage = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + if (!$util.isInteger(message.matchRatePercentage)) + return "matchRatePercentage: integer expected"; + return null; + }; + + /** + * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo + */ + ContactIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ContactIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.ContactIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + if (object.matchRatePercentage != null) + message.matchRatePercentage = object.matchRatePercentage | 0; + return message; + }; + + /** + * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.ContactIdInfo} message ContactIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.matchRatePercentage = 0; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + object.matchRatePercentage = message.matchRatePercentage; + return object; + }; + + /** + * Converts this ContactIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + * @returns {Object.} JSON object + */ + ContactIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContactIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ContactIdInfo"; + }; + + return ContactIdInfo; + })(); + + v1.MobileIdInfo = (function() { + + /** + * Properties of a MobileIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IMobileIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] MobileIdInfo dataSourceType + * @property {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null} [keySpace] MobileIdInfo keySpace + * @property {string|null} [appId] MobileIdInfo appId + */ + + /** + * Constructs a new MobileIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a MobileIdInfo. + * @implements IMobileIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set + */ + function MobileIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MobileIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.dataSourceType = null; + + /** + * MobileIdInfo keySpace. + * @member {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null|undefined} keySpace + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.keySpace = null; + + /** + * MobileIdInfo appId. + * @member {string|null|undefined} appId + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.appId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_keySpace", { + get: $util.oneOfGetter($oneOfFields = ["keySpace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_appId", { + get: $util.oneOfGetter($oneOfFields = ["appId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo instance + */ + MobileIdInfo.create = function create(properties) { + return new MobileIdInfo(properties); + }; + + /** + * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + if (message.keySpace != null && Object.hasOwnProperty.call(message, "keySpace")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keySpace); + if (message.appId != null && Object.hasOwnProperty.call(message, "appId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.appId); + return writer; + }; + + /** + * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @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.MobileIdInfo} MobileIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileIdInfo.decode = function decode(reader, 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.MobileIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + case 2: { + message.keySpace = reader.int32(); + break; + } + case 3: { + message.appId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.keySpace != null && message.hasOwnProperty("keySpace")) { + properties._keySpace = 1; + switch (message.keySpace) { + default: + return "keySpace: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.appId != null && message.hasOwnProperty("appId")) { + properties._appId = 1; + if (!$util.isString(message.appId)) + return "appId: string expected"; + } + return null; + }; + + /** + * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo + */ + MobileIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.MobileIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.MobileIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + switch (object.keySpace) { + default: + if (typeof object.keySpace === "number") { + message.keySpace = object.keySpace; + break; + } + break; + case "KEY_SPACE_UNSPECIFIED": + case 0: + message.keySpace = 0; + break; + case "IOS": + case 1: + message.keySpace = 1; + break; + case "ANDROID": + case 2: + message.keySpace = 2; + break; + } + if (object.appId != null) + message.appId = String(object.appId); + return message; + }; + + /** + * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.MobileIdInfo} message MobileIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + if (message.keySpace != null && message.hasOwnProperty("keySpace")) { + object.keySpace = options.enums === String ? $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] === undefined ? message.keySpace : $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] : message.keySpace; + if (options.oneofs) + object._keySpace = "keySpace"; + } + if (message.appId != null && message.hasOwnProperty("appId")) { + object.appId = message.appId; + if (options.oneofs) + object._appId = "appId"; + } + return object; + }; + + /** + * Converts this MobileIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + * @returns {Object.} JSON object + */ + MobileIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.MobileIdInfo"; + }; + + /** + * KeySpace enum. + * @name google.ads.datamanager.v1.MobileIdInfo.KeySpace + * @enum {number} + * @property {number} KEY_SPACE_UNSPECIFIED=0 KEY_SPACE_UNSPECIFIED value + * @property {number} IOS=1 IOS value + * @property {number} ANDROID=2 ANDROID value + */ + MobileIdInfo.KeySpace = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_SPACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IOS"] = 1; + values[valuesById[2] = "ANDROID"] = 2; + return values; + })(); + + return MobileIdInfo; + })(); + + v1.UserIdInfo = (function() { + + /** + * Properties of a UserIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IUserIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] UserIdInfo dataSourceType + */ + + /** + * Constructs a new UserIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserIdInfo. + * @implements IUserIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set + */ + function UserIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.UserIdInfo + * @instance + */ + UserIdInfo.prototype.dataSourceType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo instance + */ + UserIdInfo.create = function create(properties) { + return new UserIdInfo(properties); + }; + + /** + * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + return writer; + }; + + /** + * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserIdInfo + * @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.UserIdInfo} UserIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdInfo.decode = function decode(reader, 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.UserIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo + */ + UserIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.UserIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.UserIdInfo} message UserIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + return object; + }; + + /** + * Converts this UserIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserIdInfo + * @instance + * @returns {Object.} JSON object + */ + UserIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdInfo"; + }; + + return UserIdInfo; + })(); + + v1.PairIdInfo = (function() { + + /** + * Properties of a PairIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPairIdInfo + * @property {number|Long|null} [publisherId] PairIdInfo publisherId + * @property {string|null} [publisherName] PairIdInfo publisherName + * @property {number|null} [matchRatePercentage] PairIdInfo matchRatePercentage + * @property {number|Long|null} [advertiserIdentifierCount] PairIdInfo advertiserIdentifierCount + * @property {string|null} [cleanRoomIdentifier] PairIdInfo cleanRoomIdentifier + */ + + /** + * Constructs a new PairIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PairIdInfo. + * @implements IPairIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set + */ + function PairIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PairIdInfo publisherId. + * @member {number|Long|null|undefined} publisherId + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.publisherId = null; + + /** + * PairIdInfo publisherName. + * @member {string|null|undefined} publisherName + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.publisherName = null; + + /** + * PairIdInfo matchRatePercentage. + * @member {number} matchRatePercentage + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.matchRatePercentage = 0; + + /** + * PairIdInfo advertiserIdentifierCount. + * @member {number|Long} advertiserIdentifierCount + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.advertiserIdentifierCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PairIdInfo cleanRoomIdentifier. + * @member {string|null|undefined} cleanRoomIdentifier + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.cleanRoomIdentifier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_publisherName", { + get: $util.oneOfGetter($oneOfFields = ["publisherName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_cleanRoomIdentifier", { + get: $util.oneOfGetter($oneOfFields = ["cleanRoomIdentifier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo instance + */ + PairIdInfo.create = function create(properties) { + return new PairIdInfo(properties); + }; + + /** + * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.publisherId); + if (message.publisherName != null && Object.hasOwnProperty.call(message, "publisherName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publisherName); + if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.matchRatePercentage); + if (message.advertiserIdentifierCount != null && Object.hasOwnProperty.call(message, "advertiserIdentifierCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.advertiserIdentifierCount); + if (message.cleanRoomIdentifier != null && Object.hasOwnProperty.call(message, "cleanRoomIdentifier")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.cleanRoomIdentifier); + return writer; + }; + + /** + * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PairIdInfo + * @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.PairIdInfo} PairIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairIdInfo.decode = function decode(reader, 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.PairIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.int64(); + break; + } + case 2: { + message.publisherName = reader.string(); + break; + } + case 3: { + message.matchRatePercentage = reader.int32(); + break; + } + case 4: { + message.advertiserIdentifierCount = reader.int64(); + break; + } + case 5: { + message.cleanRoomIdentifier = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId) && !(message.publisherId && $util.isInteger(message.publisherId.low) && $util.isInteger(message.publisherId.high))) + return "publisherId: integer|Long expected"; + } + if (message.publisherName != null && message.hasOwnProperty("publisherName")) { + properties._publisherName = 1; + if (!$util.isString(message.publisherName)) + return "publisherName: string expected"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + if (!$util.isInteger(message.matchRatePercentage)) + return "matchRatePercentage: integer expected"; + if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) + if (!$util.isInteger(message.advertiserIdentifierCount) && !(message.advertiserIdentifierCount && $util.isInteger(message.advertiserIdentifierCount.low) && $util.isInteger(message.advertiserIdentifierCount.high))) + return "advertiserIdentifierCount: integer|Long expected"; + if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { + properties._cleanRoomIdentifier = 1; + if (!$util.isString(message.cleanRoomIdentifier)) + return "cleanRoomIdentifier: string expected"; + } + return null; + }; + + /** + * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo + */ + PairIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PairIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PairIdInfo(); + if (object.publisherId != null) + if ($util.Long) + (message.publisherId = $util.Long.fromValue(object.publisherId)).unsigned = false; + else if (typeof object.publisherId === "string") + message.publisherId = parseInt(object.publisherId, 10); + else if (typeof object.publisherId === "number") + message.publisherId = object.publisherId; + else if (typeof object.publisherId === "object") + message.publisherId = new $util.LongBits(object.publisherId.low >>> 0, object.publisherId.high >>> 0).toNumber(); + if (object.publisherName != null) + message.publisherName = String(object.publisherName); + if (object.matchRatePercentage != null) + message.matchRatePercentage = object.matchRatePercentage | 0; + if (object.advertiserIdentifierCount != null) + if ($util.Long) + (message.advertiserIdentifierCount = $util.Long.fromValue(object.advertiserIdentifierCount)).unsigned = false; + else if (typeof object.advertiserIdentifierCount === "string") + message.advertiserIdentifierCount = parseInt(object.advertiserIdentifierCount, 10); + else if (typeof object.advertiserIdentifierCount === "number") + message.advertiserIdentifierCount = object.advertiserIdentifierCount; + else if (typeof object.advertiserIdentifierCount === "object") + message.advertiserIdentifierCount = new $util.LongBits(object.advertiserIdentifierCount.low >>> 0, object.advertiserIdentifierCount.high >>> 0).toNumber(); + if (object.cleanRoomIdentifier != null) + message.cleanRoomIdentifier = String(object.cleanRoomIdentifier); + return message; + }; + + /** + * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.PairIdInfo} message PairIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchRatePercentage = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.advertiserIdentifierCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.advertiserIdentifierCount = options.longs === String ? "0" : 0; + } + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + if (typeof message.publisherId === "number") + object.publisherId = options.longs === String ? String(message.publisherId) : message.publisherId; + else + object.publisherId = options.longs === String ? $util.Long.prototype.toString.call(message.publisherId) : options.longs === Number ? new $util.LongBits(message.publisherId.low >>> 0, message.publisherId.high >>> 0).toNumber() : message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.publisherName != null && message.hasOwnProperty("publisherName")) { + object.publisherName = message.publisherName; + if (options.oneofs) + object._publisherName = "publisherName"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + object.matchRatePercentage = message.matchRatePercentage; + if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) + if (typeof message.advertiserIdentifierCount === "number") + object.advertiserIdentifierCount = options.longs === String ? String(message.advertiserIdentifierCount) : message.advertiserIdentifierCount; + else + object.advertiserIdentifierCount = options.longs === String ? $util.Long.prototype.toString.call(message.advertiserIdentifierCount) : options.longs === Number ? new $util.LongBits(message.advertiserIdentifierCount.low >>> 0, message.advertiserIdentifierCount.high >>> 0).toNumber() : message.advertiserIdentifierCount; + if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { + object.cleanRoomIdentifier = message.cleanRoomIdentifier; + if (options.oneofs) + object._cleanRoomIdentifier = "cleanRoomIdentifier"; + } + return object; + }; + + /** + * Converts this PairIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + * @returns {Object.} JSON object + */ + PairIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PairIdInfo"; + }; + + return PairIdInfo; + })(); + + v1.PartnerAudienceInfo = (function() { + + /** + * Properties of a PartnerAudienceInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPartnerAudienceInfo + * @property {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null} [partnerAudienceSource] PartnerAudienceInfo partnerAudienceSource + * @property {string|null} [commercePartner] PartnerAudienceInfo commercePartner + */ + + /** + * Constructs a new PartnerAudienceInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerAudienceInfo. + * @implements IPartnerAudienceInfo + * @constructor + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set + */ + function PartnerAudienceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartnerAudienceInfo partnerAudienceSource. + * @member {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null|undefined} partnerAudienceSource + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + */ + PartnerAudienceInfo.prototype.partnerAudienceSource = null; + + /** + * PartnerAudienceInfo commercePartner. + * @member {string|null|undefined} commercePartner + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + */ + PartnerAudienceInfo.prototype.commercePartner = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartnerAudienceInfo.prototype, "_partnerAudienceSource", { + get: $util.oneOfGetter($oneOfFields = ["partnerAudienceSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartnerAudienceInfo.prototype, "_commercePartner", { + get: $util.oneOfGetter($oneOfFields = ["commercePartner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PartnerAudienceInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo instance + */ + PartnerAudienceInfo.create = function create(properties) { + return new PartnerAudienceInfo(properties); + }; + + /** + * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerAudienceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partnerAudienceSource != null && Object.hasOwnProperty.call(message, "partnerAudienceSource")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partnerAudienceSource); + if (message.commercePartner != null && Object.hasOwnProperty.call(message, "commercePartner")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commercePartner); + return writer; + }; + + /** + * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerAudienceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @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.PartnerAudienceInfo} PartnerAudienceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerAudienceInfo.decode = function decode(reader, 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.PartnerAudienceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partnerAudienceSource = reader.int32(); + break; + } + case 2: { + message.commercePartner = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerAudienceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartnerAudienceInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartnerAudienceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { + properties._partnerAudienceSource = 1; + switch (message.partnerAudienceSource) { + default: + return "partnerAudienceSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { + properties._commercePartner = 1; + if (!$util.isString(message.commercePartner)) + return "commercePartner: string expected"; + } + return null; + }; + + /** + * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo + */ + PartnerAudienceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PartnerAudienceInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PartnerAudienceInfo(); + switch (object.partnerAudienceSource) { + default: + if (typeof object.partnerAudienceSource === "number") { + message.partnerAudienceSource = object.partnerAudienceSource; + break; + } + break; + case "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": + case 0: + message.partnerAudienceSource = 0; + break; + case "COMMERCE_AUDIENCE": + case 1: + message.partnerAudienceSource = 1; + break; + case "LINEAR_TV_AUDIENCE": + case 2: + message.partnerAudienceSource = 2; + break; + case "AGENCY_PROVIDER_AUDIENCE": + case 3: + message.partnerAudienceSource = 3; + break; + } + if (object.commercePartner != null) + message.commercePartner = String(object.commercePartner); + return message; + }; + + /** + * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.PartnerAudienceInfo} message PartnerAudienceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartnerAudienceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { + object.partnerAudienceSource = options.enums === String ? $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] === undefined ? message.partnerAudienceSource : $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] : message.partnerAudienceSource; + if (options.oneofs) + object._partnerAudienceSource = "partnerAudienceSource"; + } + if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { + object.commercePartner = message.commercePartner; + if (options.oneofs) + object._commercePartner = "commercePartner"; + } + return object; + }; + + /** + * Converts this PartnerAudienceInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + * @returns {Object.} JSON object + */ + PartnerAudienceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartnerAudienceInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartnerAudienceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerAudienceInfo"; + }; + + /** + * PartnerAudienceSource enum. + * @name google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource + * @enum {number} + * @property {number} PARTNER_AUDIENCE_SOURCE_UNSPECIFIED=0 PARTNER_AUDIENCE_SOURCE_UNSPECIFIED value + * @property {number} COMMERCE_AUDIENCE=1 COMMERCE_AUDIENCE value + * @property {number} LINEAR_TV_AUDIENCE=2 LINEAR_TV_AUDIENCE value + * @property {number} AGENCY_PROVIDER_AUDIENCE=3 AGENCY_PROVIDER_AUDIENCE value + */ + PartnerAudienceInfo.PartnerAudienceSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMMERCE_AUDIENCE"] = 1; + values[valuesById[2] = "LINEAR_TV_AUDIENCE"] = 2; + values[valuesById[3] = "AGENCY_PROVIDER_AUDIENCE"] = 3; + return values; + })(); + + return PartnerAudienceInfo; + })(); + + v1.PseudonymousIdInfo = (function() { + + /** + * Properties of a PseudonymousIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPseudonymousIdInfo + * @property {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null} [syncStatus] PseudonymousIdInfo syncStatus + * @property {number|Long|null} [billableRecordCount] PseudonymousIdInfo billableRecordCount + */ + + /** + * Constructs a new PseudonymousIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PseudonymousIdInfo. + * @implements IPseudonymousIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set + */ + function PseudonymousIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PseudonymousIdInfo syncStatus. + * @member {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null|undefined} syncStatus + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + */ + PseudonymousIdInfo.prototype.syncStatus = null; + + /** + * PseudonymousIdInfo billableRecordCount. + * @member {number|Long|null|undefined} billableRecordCount + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + */ + PseudonymousIdInfo.prototype.billableRecordCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PseudonymousIdInfo.prototype, "_syncStatus", { + get: $util.oneOfGetter($oneOfFields = ["syncStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PseudonymousIdInfo.prototype, "_billableRecordCount", { + get: $util.oneOfGetter($oneOfFields = ["billableRecordCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PseudonymousIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo instance + */ + PseudonymousIdInfo.create = function create(properties) { + return new PseudonymousIdInfo(properties); + }; + + /** + * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PseudonymousIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.syncStatus != null && Object.hasOwnProperty.call(message, "syncStatus")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncStatus); + if (message.billableRecordCount != null && Object.hasOwnProperty.call(message, "billableRecordCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.billableRecordCount); + return writer; + }; + + /** + * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PseudonymousIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @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.PseudonymousIdInfo} PseudonymousIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PseudonymousIdInfo.decode = function decode(reader, 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.PseudonymousIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.syncStatus = reader.int32(); + break; + } + case 2: { + message.billableRecordCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PseudonymousIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PseudonymousIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PseudonymousIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { + properties._syncStatus = 1; + switch (message.syncStatus) { + default: + return "syncStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { + properties._billableRecordCount = 1; + if (!$util.isInteger(message.billableRecordCount) && !(message.billableRecordCount && $util.isInteger(message.billableRecordCount.low) && $util.isInteger(message.billableRecordCount.high))) + return "billableRecordCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo + */ + PseudonymousIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PseudonymousIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PseudonymousIdInfo(); + switch (object.syncStatus) { + default: + if (typeof object.syncStatus === "number") { + message.syncStatus = object.syncStatus; + break; + } + break; + case "SYNC_STATUS_UNSPECIFIED": + case 0: + message.syncStatus = 0; + break; + case "CREATED": + case 1: + message.syncStatus = 1; + break; + case "READY_FOR_USE": + case 2: + message.syncStatus = 2; + break; + case "FAILED": + case 3: + message.syncStatus = 3; + break; + } + if (object.billableRecordCount != null) + if ($util.Long) + (message.billableRecordCount = $util.Long.fromValue(object.billableRecordCount)).unsigned = false; + else if (typeof object.billableRecordCount === "string") + message.billableRecordCount = parseInt(object.billableRecordCount, 10); + else if (typeof object.billableRecordCount === "number") + message.billableRecordCount = object.billableRecordCount; + else if (typeof object.billableRecordCount === "object") + message.billableRecordCount = new $util.LongBits(object.billableRecordCount.low >>> 0, object.billableRecordCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.PseudonymousIdInfo} message PseudonymousIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PseudonymousIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { + object.syncStatus = options.enums === String ? $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] === undefined ? message.syncStatus : $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] : message.syncStatus; + if (options.oneofs) + object._syncStatus = "syncStatus"; + } + if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { + if (typeof message.billableRecordCount === "number") + object.billableRecordCount = options.longs === String ? String(message.billableRecordCount) : message.billableRecordCount; + else + object.billableRecordCount = options.longs === String ? $util.Long.prototype.toString.call(message.billableRecordCount) : options.longs === Number ? new $util.LongBits(message.billableRecordCount.low >>> 0, message.billableRecordCount.high >>> 0).toNumber() : message.billableRecordCount; + if (options.oneofs) + object._billableRecordCount = "billableRecordCount"; + } + return object; + }; + + /** + * Converts this PseudonymousIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + * @returns {Object.} JSON object + */ + PseudonymousIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PseudonymousIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PseudonymousIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PseudonymousIdInfo"; + }; + + /** + * SyncStatus enum. + * @name google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus + * @enum {number} + * @property {number} SYNC_STATUS_UNSPECIFIED=0 SYNC_STATUS_UNSPECIFIED value + * @property {number} CREATED=1 CREATED value + * @property {number} READY_FOR_USE=2 READY_FOR_USE value + * @property {number} FAILED=3 FAILED value + */ + PseudonymousIdInfo.SyncStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYNC_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATED"] = 1; + values[valuesById[2] = "READY_FOR_USE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return PseudonymousIdInfo; + })(); + + /** + * DataSourceType enum. + * @name google.ads.datamanager.v1.DataSourceType + * @enum {number} + * @property {number} DATA_SOURCE_TYPE_UNSPECIFIED=0 DATA_SOURCE_TYPE_UNSPECIFIED value + * @property {number} DATA_SOURCE_TYPE_FIRST_PARTY=1 DATA_SOURCE_TYPE_FIRST_PARTY value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU=2 DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE=3 DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA=4 DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA value + */ + v1.DataSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_SOURCE_TYPE_FIRST_PARTY"] = 1; + values[valuesById[2] = "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU"] = 2; + values[valuesById[3] = "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE"] = 3; + values[valuesById[4] = "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"] = 4; + return values; + })(); + + v1.UserListDirectLicense = (function() { + + /** + * Properties of a UserListDirectLicense. + * @memberof google.ads.datamanager.v1 + * @interface IUserListDirectLicense + * @property {string|null} [name] UserListDirectLicense name + * @property {number|Long|null} [userListId] UserListDirectLicense userListId + * @property {string|null} [userListDisplayName] UserListDirectLicense userListDisplayName + * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListDirectLicense clientAccountType + * @property {number|Long|null} [clientAccountId] UserListDirectLicense clientAccountId + * @property {string|null} [clientAccountDisplayName] UserListDirectLicense clientAccountDisplayName + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListDirectLicense status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListDirectLicense pricing + * @property {Array.|null} [historicalPricings] UserListDirectLicense historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListDirectLicense metrics + */ + + /** + * Constructs a new UserListDirectLicense. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListDirectLicense. + * @implements IUserListDirectLicense + * @constructor + * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set + */ + function UserListDirectLicense(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListDirectLicense name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.name = ""; + + /** + * UserListDirectLicense userListId. + * @member {number|Long|null|undefined} userListId + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.userListId = null; + + /** + * UserListDirectLicense userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.userListDisplayName = ""; + + /** + * UserListDirectLicense clientAccountType. + * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType|null|undefined} clientAccountType + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountType = null; + + /** + * UserListDirectLicense clientAccountId. + * @member {number|Long|null|undefined} clientAccountId + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountId = null; + + /** + * UserListDirectLicense clientAccountDisplayName. + * @member {string} clientAccountDisplayName + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountDisplayName = ""; + + /** + * UserListDirectLicense status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.status = null; + + /** + * UserListDirectLicense pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.pricing = null; + + /** + * UserListDirectLicense historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListDirectLicense metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.metrics = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_userListId", { + get: $util.oneOfGetter($oneOfFields = ["userListId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountType", { + get: $util.oneOfGetter($oneOfFields = ["clientAccountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountId", { + get: $util.oneOfGetter($oneOfFields = ["clientAccountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListDirectLicense instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense instance + */ + UserListDirectLicense.create = function create(properties) { + return new UserListDirectLicense(properties); + }; + + /** + * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListDirectLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clientAccountType); + if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientAccountId); + if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.clientAccountDisplayName); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListDirectLicense.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @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.UserListDirectLicense} UserListDirectLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListDirectLicense.decode = function decode(reader, 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.UserListDirectLicense(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.clientAccountType = reader.int32(); + break; + } + case 5: { + message.clientAccountId = reader.int64(); + break; + } + case 6: { + message.clientAccountDisplayName = reader.string(); + break; + } + case 7: { + message.status = reader.int32(); + break; + } + case 8: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 10: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListDirectLicense.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListDirectLicense message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListDirectLicense.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.userListId != null && message.hasOwnProperty("userListId")) { + properties._userListId = 1; + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { + properties._clientAccountType = 1; + switch (message.clientAccountType) { + default: + return "clientAccountType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { + properties._clientAccountId = 1; + if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) + return "clientAccountId: integer|Long expected"; + } + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + if (!$util.isString(message.clientAccountDisplayName)) + return "clientAccountDisplayName: 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense + */ + UserListDirectLicense.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListDirectLicense) + return object; + var message = new $root.google.ads.datamanager.v1.UserListDirectLicense(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.clientAccountType) { + default: + if (typeof object.clientAccountType === "number") { + message.clientAccountType = object.clientAccountType; + break; + } + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": + case 0: + message.clientAccountType = 0; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": + case 1: + message.clientAccountType = 1; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": + case 2: + message.clientAccountType = 2; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": + case 3: + message.clientAccountType = 3; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 4: + message.clientAccountType = 4; + break; + } + if (object.clientAccountId != null) + if ($util.Long) + (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; + else if (typeof object.clientAccountId === "string") + message.clientAccountId = parseInt(object.clientAccountId, 10); + else if (typeof object.clientAccountId === "number") + message.clientAccountId = object.clientAccountId; + else if (typeof object.clientAccountId === "object") + message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); + if (object.clientAccountDisplayName != null) + message.clientAccountDisplayName = String(object.clientAccountDisplayName); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.UserListDirectLicense} message UserListDirectLicense + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListDirectLicense.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + object.userListDisplayName = ""; + object.clientAccountDisplayName = ""; + object.pricing = null; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) { + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (options.oneofs) + object._userListId = "userListId"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { + object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; + if (options.oneofs) + object._clientAccountType = "clientAccountType"; + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { + if (typeof message.clientAccountId === "number") + object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; + else + object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; + if (options.oneofs) + object._clientAccountId = "clientAccountId"; + } + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + object.clientAccountDisplayName = message.clientAccountDisplayName; + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListDirectLicense to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + * @returns {Object.} JSON object + */ + UserListDirectLicense.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListDirectLicense + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListDirectLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListDirectLicense"; + }; + + return UserListDirectLicense; + })(); + + /** + * UserListLicenseClientAccountType enum. + * @name google.ads.datamanager.v1.UserListLicenseClientAccountType + * @enum {number} + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN=0 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS=1 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER=2 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER=3 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK=4 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK value + */ + v1.UserListLicenseClientAccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS"] = 1; + values[valuesById[2] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER"] = 2; + values[valuesById[3] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER"] = 3; + values[valuesById[4] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 4; + return values; + })(); + + v1.UserListLicenseMetrics = (function() { + + /** + * Properties of a UserListLicenseMetrics. + * @memberof google.ads.datamanager.v1 + * @interface IUserListLicenseMetrics + * @property {number|Long|null} [clickCount] UserListLicenseMetrics clickCount + * @property {number|Long|null} [impressionCount] UserListLicenseMetrics impressionCount + * @property {number|Long|null} [revenueUsdMicros] UserListLicenseMetrics revenueUsdMicros + * @property {number|Long|null} [startDate] UserListLicenseMetrics startDate + * @property {number|Long|null} [endDate] UserListLicenseMetrics endDate + */ + + /** + * Constructs a new UserListLicenseMetrics. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListLicenseMetrics. + * @implements IUserListLicenseMetrics + * @constructor + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set + */ + function UserListLicenseMetrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListLicenseMetrics clickCount. + * @member {number|Long} clickCount + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.clickCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics impressionCount. + * @member {number|Long} impressionCount + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.impressionCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics revenueUsdMicros. + * @member {number|Long} revenueUsdMicros + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.revenueUsdMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics startDate. + * @member {number|Long} startDate + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.startDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics endDate. + * @member {number|Long} endDate + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.endDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UserListLicenseMetrics instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics instance + */ + UserListLicenseMetrics.create = function create(properties) { + return new UserListLicenseMetrics(properties); + }; + + /** + * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicenseMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clickCount != null && Object.hasOwnProperty.call(message, "clickCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.clickCount); + if (message.impressionCount != null && Object.hasOwnProperty.call(message, "impressionCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.impressionCount); + if (message.revenueUsdMicros != null && Object.hasOwnProperty.call(message, "revenueUsdMicros")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.revenueUsdMicros); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endDate); + return writer; + }; + + /** + * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicenseMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @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.UserListLicenseMetrics} UserListLicenseMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicenseMetrics.decode = function decode(reader, 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.UserListLicenseMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clickCount = reader.int64(); + break; + } + case 2: { + message.impressionCount = reader.int64(); + break; + } + case 3: { + message.revenueUsdMicros = reader.int64(); + break; + } + case 4: { + message.startDate = reader.int64(); + break; + } + case 5: { + message.endDate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicenseMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListLicenseMetrics message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListLicenseMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clickCount != null && message.hasOwnProperty("clickCount")) + if (!$util.isInteger(message.clickCount) && !(message.clickCount && $util.isInteger(message.clickCount.low) && $util.isInteger(message.clickCount.high))) + return "clickCount: integer|Long expected"; + if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) + if (!$util.isInteger(message.impressionCount) && !(message.impressionCount && $util.isInteger(message.impressionCount.low) && $util.isInteger(message.impressionCount.high))) + return "impressionCount: integer|Long expected"; + if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) + if (!$util.isInteger(message.revenueUsdMicros) && !(message.revenueUsdMicros && $util.isInteger(message.revenueUsdMicros.low) && $util.isInteger(message.revenueUsdMicros.high))) + return "revenueUsdMicros: integer|Long expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isInteger(message.startDate) && !(message.startDate && $util.isInteger(message.startDate.low) && $util.isInteger(message.startDate.high))) + return "startDate: integer|Long expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isInteger(message.endDate) && !(message.endDate && $util.isInteger(message.endDate.low) && $util.isInteger(message.endDate.high))) + return "endDate: integer|Long expected"; + return null; + }; + + /** + * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics + */ + UserListLicenseMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListLicenseMetrics) + return object; + var message = new $root.google.ads.datamanager.v1.UserListLicenseMetrics(); + if (object.clickCount != null) + if ($util.Long) + (message.clickCount = $util.Long.fromValue(object.clickCount)).unsigned = false; + else if (typeof object.clickCount === "string") + message.clickCount = parseInt(object.clickCount, 10); + else if (typeof object.clickCount === "number") + message.clickCount = object.clickCount; + else if (typeof object.clickCount === "object") + message.clickCount = new $util.LongBits(object.clickCount.low >>> 0, object.clickCount.high >>> 0).toNumber(); + if (object.impressionCount != null) + if ($util.Long) + (message.impressionCount = $util.Long.fromValue(object.impressionCount)).unsigned = false; + else if (typeof object.impressionCount === "string") + message.impressionCount = parseInt(object.impressionCount, 10); + else if (typeof object.impressionCount === "number") + message.impressionCount = object.impressionCount; + else if (typeof object.impressionCount === "object") + message.impressionCount = new $util.LongBits(object.impressionCount.low >>> 0, object.impressionCount.high >>> 0).toNumber(); + if (object.revenueUsdMicros != null) + if ($util.Long) + (message.revenueUsdMicros = $util.Long.fromValue(object.revenueUsdMicros)).unsigned = false; + else if (typeof object.revenueUsdMicros === "string") + message.revenueUsdMicros = parseInt(object.revenueUsdMicros, 10); + else if (typeof object.revenueUsdMicros === "number") + message.revenueUsdMicros = object.revenueUsdMicros; + else if (typeof object.revenueUsdMicros === "object") + message.revenueUsdMicros = new $util.LongBits(object.revenueUsdMicros.low >>> 0, object.revenueUsdMicros.high >>> 0).toNumber(); + if (object.startDate != null) + if ($util.Long) + (message.startDate = $util.Long.fromValue(object.startDate)).unsigned = false; + else if (typeof object.startDate === "string") + message.startDate = parseInt(object.startDate, 10); + else if (typeof object.startDate === "number") + message.startDate = object.startDate; + else if (typeof object.startDate === "object") + message.startDate = new $util.LongBits(object.startDate.low >>> 0, object.startDate.high >>> 0).toNumber(); + if (object.endDate != null) + if ($util.Long) + (message.endDate = $util.Long.fromValue(object.endDate)).unsigned = false; + else if (typeof object.endDate === "string") + message.endDate = parseInt(object.endDate, 10); + else if (typeof object.endDate === "number") + message.endDate = object.endDate; + else if (typeof object.endDate === "object") + message.endDate = new $util.LongBits(object.endDate.low >>> 0, object.endDate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.UserListLicenseMetrics} message UserListLicenseMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListLicenseMetrics.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.clickCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.clickCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.impressionCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.impressionCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.revenueUsdMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revenueUsdMicros = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startDate = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endDate = options.longs === String ? "0" : 0; + } + if (message.clickCount != null && message.hasOwnProperty("clickCount")) + if (typeof message.clickCount === "number") + object.clickCount = options.longs === String ? String(message.clickCount) : message.clickCount; + else + object.clickCount = options.longs === String ? $util.Long.prototype.toString.call(message.clickCount) : options.longs === Number ? new $util.LongBits(message.clickCount.low >>> 0, message.clickCount.high >>> 0).toNumber() : message.clickCount; + if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) + if (typeof message.impressionCount === "number") + object.impressionCount = options.longs === String ? String(message.impressionCount) : message.impressionCount; + else + object.impressionCount = options.longs === String ? $util.Long.prototype.toString.call(message.impressionCount) : options.longs === Number ? new $util.LongBits(message.impressionCount.low >>> 0, message.impressionCount.high >>> 0).toNumber() : message.impressionCount; + if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) + if (typeof message.revenueUsdMicros === "number") + object.revenueUsdMicros = options.longs === String ? String(message.revenueUsdMicros) : message.revenueUsdMicros; + else + object.revenueUsdMicros = options.longs === String ? $util.Long.prototype.toString.call(message.revenueUsdMicros) : options.longs === Number ? new $util.LongBits(message.revenueUsdMicros.low >>> 0, message.revenueUsdMicros.high >>> 0).toNumber() : message.revenueUsdMicros; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (typeof message.startDate === "number") + object.startDate = options.longs === String ? String(message.startDate) : message.startDate; + else + object.startDate = options.longs === String ? $util.Long.prototype.toString.call(message.startDate) : options.longs === Number ? new $util.LongBits(message.startDate.low >>> 0, message.startDate.high >>> 0).toNumber() : message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (typeof message.endDate === "number") + object.endDate = options.longs === String ? String(message.endDate) : message.endDate; + else + object.endDate = options.longs === String ? $util.Long.prototype.toString.call(message.endDate) : options.longs === Number ? new $util.LongBits(message.endDate.low >>> 0, message.endDate.high >>> 0).toNumber() : message.endDate; + return object; + }; + + /** + * Converts this UserListLicenseMetrics to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + * @returns {Object.} JSON object + */ + UserListLicenseMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListLicenseMetrics + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListLicenseMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicenseMetrics"; + }; + + return UserListLicenseMetrics; + })(); + + v1.UserListLicensePricing = (function() { + + /** + * Properties of a UserListLicensePricing. + * @memberof google.ads.datamanager.v1 + * @interface IUserListLicensePricing + * @property {number|Long|null} [pricingId] UserListLicensePricing pricingId + * @property {number|Long|null} [costMicros] UserListLicensePricing costMicros + * @property {string|null} [currencyCode] UserListLicensePricing currencyCode + * @property {google.protobuf.ITimestamp|null} [startTime] UserListLicensePricing startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UserListLicensePricing endTime + * @property {boolean|null} [pricingActive] UserListLicensePricing pricingActive + * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null} [buyerApprovalState] UserListLicensePricing buyerApprovalState + * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null} [costType] UserListLicensePricing costType + * @property {number|Long|null} [maxCostMicros] UserListLicensePricing maxCostMicros + */ + + /** + * Constructs a new UserListLicensePricing. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListLicensePricing. + * @implements IUserListLicensePricing + * @constructor + * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set + */ + function UserListLicensePricing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListLicensePricing pricingId. + * @member {number|Long} pricingId + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.pricingId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicensePricing costMicros. + * @member {number|Long|null|undefined} costMicros + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.costMicros = null; + + /** + * UserListLicensePricing currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.currencyCode = null; + + /** + * UserListLicensePricing startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.startTime = null; + + /** + * UserListLicensePricing endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.endTime = null; + + /** + * UserListLicensePricing pricingActive. + * @member {boolean} pricingActive + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.pricingActive = false; + + /** + * UserListLicensePricing buyerApprovalState. + * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState} buyerApprovalState + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.buyerApprovalState = 0; + + /** + * UserListLicensePricing costType. + * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null|undefined} costType + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.costType = null; + + /** + * UserListLicensePricing maxCostMicros. + * @member {number|Long|null|undefined} maxCostMicros + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.maxCostMicros = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_costMicros", { + get: $util.oneOfGetter($oneOfFields = ["costMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_costType", { + get: $util.oneOfGetter($oneOfFields = ["costType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_maxCostMicros", { + get: $util.oneOfGetter($oneOfFields = ["maxCostMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListLicensePricing instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing instance + */ + UserListLicensePricing.create = function create(properties) { + return new UserListLicensePricing(properties); + }; + + /** + * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicensePricing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pricingId != null && Object.hasOwnProperty.call(message, "pricingId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pricingId); + if (message.costMicros != null && Object.hasOwnProperty.call(message, "costMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.costMicros); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pricingActive != null && Object.hasOwnProperty.call(message, "pricingActive")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.pricingActive); + if (message.buyerApprovalState != null && Object.hasOwnProperty.call(message, "buyerApprovalState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.buyerApprovalState); + if (message.costType != null && Object.hasOwnProperty.call(message, "costType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.costType); + if (message.maxCostMicros != null && Object.hasOwnProperty.call(message, "maxCostMicros")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxCostMicros); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.currencyCode); + return writer; + }; + + /** + * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicensePricing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @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.UserListLicensePricing} UserListLicensePricing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicensePricing.decode = function decode(reader, 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.UserListLicensePricing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pricingId = reader.int64(); + break; + } + case 2: { + message.costMicros = reader.int64(); + break; + } + case 9: { + message.currencyCode = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pricingActive = reader.bool(); + break; + } + case 6: { + message.buyerApprovalState = reader.int32(); + break; + } + case 7: { + message.costType = reader.int32(); + break; + } + case 8: { + message.maxCostMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicensePricing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListLicensePricing message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListLicensePricing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pricingId != null && message.hasOwnProperty("pricingId")) + if (!$util.isInteger(message.pricingId) && !(message.pricingId && $util.isInteger(message.pricingId.low) && $util.isInteger(message.pricingId.high))) + return "pricingId: integer|Long expected"; + if (message.costMicros != null && message.hasOwnProperty("costMicros")) { + properties._costMicros = 1; + if (!$util.isInteger(message.costMicros) && !(message.costMicros && $util.isInteger(message.costMicros.low) && $util.isInteger(message.costMicros.high))) + return "costMicros: integer|Long 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")) { + 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; + } + if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) + if (typeof message.pricingActive !== "boolean") + return "pricingActive: boolean expected"; + if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) + switch (message.buyerApprovalState) { + default: + return "buyerApprovalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.costType != null && message.hasOwnProperty("costType")) { + properties._costType = 1; + switch (message.costType) { + default: + return "costType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { + properties._maxCostMicros = 1; + if (!$util.isInteger(message.maxCostMicros) && !(message.maxCostMicros && $util.isInteger(message.maxCostMicros.low) && $util.isInteger(message.maxCostMicros.high))) + return "maxCostMicros: integer|Long expected"; + } + return null; + }; + + /** + * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing + */ + UserListLicensePricing.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListLicensePricing) + return object; + var message = new $root.google.ads.datamanager.v1.UserListLicensePricing(); + if (object.pricingId != null) + if ($util.Long) + (message.pricingId = $util.Long.fromValue(object.pricingId)).unsigned = false; + else if (typeof object.pricingId === "string") + message.pricingId = parseInt(object.pricingId, 10); + else if (typeof object.pricingId === "number") + message.pricingId = object.pricingId; + else if (typeof object.pricingId === "object") + message.pricingId = new $util.LongBits(object.pricingId.low >>> 0, object.pricingId.high >>> 0).toNumber(); + if (object.costMicros != null) + if ($util.Long) + (message.costMicros = $util.Long.fromValue(object.costMicros)).unsigned = false; + else if (typeof object.costMicros === "string") + message.costMicros = parseInt(object.costMicros, 10); + else if (typeof object.costMicros === "number") + message.costMicros = object.costMicros; + else if (typeof object.costMicros === "object") + message.costMicros = new $util.LongBits(object.costMicros.low >>> 0, object.costMicros.high >>> 0).toNumber(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListLicensePricing.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.datamanager.v1.UserListLicensePricing.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.pricingActive != null) + message.pricingActive = Boolean(object.pricingActive); + switch (object.buyerApprovalState) { + default: + if (typeof object.buyerApprovalState === "number") { + message.buyerApprovalState = object.buyerApprovalState; + break; + } + break; + case "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": + case 0: + message.buyerApprovalState = 0; + break; + case "PENDING": + case 1: + message.buyerApprovalState = 1; + break; + case "APPROVED": + case 2: + message.buyerApprovalState = 2; + break; + case "REJECTED": + case 3: + message.buyerApprovalState = 3; + break; + } + switch (object.costType) { + default: + if (typeof object.costType === "number") { + message.costType = object.costType; + break; + } + break; + case "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": + case 0: + message.costType = 0; + break; + case "CPC": + case 1: + message.costType = 1; + break; + case "CPM": + case 2: + message.costType = 2; + break; + case "MEDIA_SHARE": + case 3: + message.costType = 3; + break; + } + if (object.maxCostMicros != null) + if ($util.Long) + (message.maxCostMicros = $util.Long.fromValue(object.maxCostMicros)).unsigned = false; + else if (typeof object.maxCostMicros === "string") + message.maxCostMicros = parseInt(object.maxCostMicros, 10); + else if (typeof object.maxCostMicros === "number") + message.maxCostMicros = object.maxCostMicros; + else if (typeof object.maxCostMicros === "object") + message.maxCostMicros = new $util.LongBits(object.maxCostMicros.low >>> 0, object.maxCostMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.UserListLicensePricing} message UserListLicensePricing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListLicensePricing.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.pricingId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pricingId = options.longs === String ? "0" : 0; + object.startTime = null; + object.endTime = null; + object.pricingActive = false; + object.buyerApprovalState = options.enums === String ? "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED" : 0; + } + if (message.pricingId != null && message.hasOwnProperty("pricingId")) + if (typeof message.pricingId === "number") + object.pricingId = options.longs === String ? String(message.pricingId) : message.pricingId; + else + object.pricingId = options.longs === String ? $util.Long.prototype.toString.call(message.pricingId) : options.longs === Number ? new $util.LongBits(message.pricingId.low >>> 0, message.pricingId.high >>> 0).toNumber() : message.pricingId; + if (message.costMicros != null && message.hasOwnProperty("costMicros")) { + if (typeof message.costMicros === "number") + object.costMicros = options.longs === String ? String(message.costMicros) : message.costMicros; + else + object.costMicros = options.longs === String ? $util.Long.prototype.toString.call(message.costMicros) : options.longs === Number ? new $util.LongBits(message.costMicros.low >>> 0, message.costMicros.high >>> 0).toNumber() : message.costMicros; + if (options.oneofs) + object._costMicros = "costMicros"; + } + 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); + if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) + object.pricingActive = message.pricingActive; + if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) + object.buyerApprovalState = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] === undefined ? message.buyerApprovalState : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] : message.buyerApprovalState; + if (message.costType != null && message.hasOwnProperty("costType")) { + object.costType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] === undefined ? message.costType : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] : message.costType; + if (options.oneofs) + object._costType = "costType"; + } + if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { + if (typeof message.maxCostMicros === "number") + object.maxCostMicros = options.longs === String ? String(message.maxCostMicros) : message.maxCostMicros; + else + object.maxCostMicros = options.longs === String ? $util.Long.prototype.toString.call(message.maxCostMicros) : options.longs === Number ? new $util.LongBits(message.maxCostMicros.low >>> 0, message.maxCostMicros.high >>> 0).toNumber() : message.maxCostMicros; + if (options.oneofs) + object._maxCostMicros = "maxCostMicros"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + return object; + }; + + /** + * Converts this UserListLicensePricing to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + * @returns {Object.} JSON object + */ + UserListLicensePricing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListLicensePricing + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListLicensePricing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicensePricing"; + }; + + /** + * UserListPricingBuyerApprovalState enum. + * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState + * @enum {number} + * @property {number} USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED=0 USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} APPROVED=2 APPROVED value + * @property {number} REJECTED=3 REJECTED value + */ + UserListLicensePricing.UserListPricingBuyerApprovalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "APPROVED"] = 2; + values[valuesById[3] = "REJECTED"] = 3; + return values; + })(); + + /** + * UserListPricingCostType enum. + * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType + * @enum {number} + * @property {number} USER_LIST_PRICING_COST_TYPE_UNSPECIFIED=0 USER_LIST_PRICING_COST_TYPE_UNSPECIFIED value + * @property {number} CPC=1 CPC value + * @property {number} CPM=2 CPM value + * @property {number} MEDIA_SHARE=3 MEDIA_SHARE value + */ + UserListLicensePricing.UserListPricingCostType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CPC"] = 1; + values[valuesById[2] = "CPM"] = 2; + values[valuesById[3] = "MEDIA_SHARE"] = 3; + return values; + })(); + + return UserListLicensePricing; + })(); + + /** + * UserListLicenseStatus enum. + * @name google.ads.datamanager.v1.UserListLicenseStatus + * @enum {number} + * @property {number} USER_LIST_LICENSE_STATUS_UNSPECIFIED=0 USER_LIST_LICENSE_STATUS_UNSPECIFIED value + * @property {number} USER_LIST_LICENSE_STATUS_ENABLED=1 USER_LIST_LICENSE_STATUS_ENABLED value + * @property {number} USER_LIST_LICENSE_STATUS_DISABLED=2 USER_LIST_LICENSE_STATUS_DISABLED value + */ + v1.UserListLicenseStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_LICENSE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_LIST_LICENSE_STATUS_ENABLED"] = 1; + values[valuesById[2] = "USER_LIST_LICENSE_STATUS_DISABLED"] = 2; + return values; + })(); + + v1.UserListDirectLicenseService = (function() { + + /** + * Constructs a new UserListDirectLicenseService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListDirectLicenseService + * @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 UserListDirectLicenseService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListDirectLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListDirectLicenseService; + + /** + * Creates new UserListDirectLicenseService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @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 {UserListDirectLicenseService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListDirectLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef CreateUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls CreateUserListDirectLicense. + * @function createUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.createUserListDirectLicense = function createUserListDirectLicense(request, callback) { + return this.rpcCall(createUserListDirectLicense, $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "CreateUserListDirectLicense" }); + + /** + * Calls CreateUserListDirectLicense. + * @function createUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef GetUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls GetUserListDirectLicense. + * @function getUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.getUserListDirectLicense = function getUserListDirectLicense(request, callback) { + return this.rpcCall(getUserListDirectLicense, $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "GetUserListDirectLicense" }); + + /** + * Calls GetUserListDirectLicense. + * @function getUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef UpdateUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls UpdateUserListDirectLicense. + * @function updateUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.updateUserListDirectLicense = function updateUserListDirectLicense(request, callback) { + return this.rpcCall(updateUserListDirectLicense, $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "UpdateUserListDirectLicense" }); + + /** + * Calls UpdateUserListDirectLicense. + * @function updateUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef ListUserListDirectLicensesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} [response] ListUserListDirectLicensesResponse + */ + + /** + * Calls ListUserListDirectLicenses. + * @function listUserListDirectLicenses + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.listUserListDirectLicenses = function listUserListDirectLicenses(request, callback) { + return this.rpcCall(listUserListDirectLicenses, $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest, $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse, request, callback); + }, "name", { value: "ListUserListDirectLicenses" }); + + /** + * Calls ListUserListDirectLicenses. + * @function listUserListDirectLicenses + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListDirectLicenseService; + })(); + + v1.CreateUserListDirectLicenseRequest = (function() { + + /** + * Properties of a CreateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreateUserListDirectLicenseRequest + * @property {string|null} [parent] CreateUserListDirectLicenseRequest parent + * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] CreateUserListDirectLicenseRequest userListDirectLicense + */ + + /** + * Constructs a new CreateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreateUserListDirectLicenseRequest. + * @implements ICreateUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set + */ + function CreateUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserListDirectLicenseRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + */ + CreateUserListDirectLicenseRequest.prototype.parent = ""; + + /** + * CreateUserListDirectLicenseRequest userListDirectLicense. + * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + */ + CreateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; + + /** + * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest instance + */ + CreateUserListDirectLicenseRequest.create = function create(properties) { + return new CreateUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @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.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListDirectLicenseRequest.decode = function decode(reader, 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.CreateUserListDirectLicenseRequest(); + 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.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); + if (error) + return "userListDirectLicense." + error; + } + return null; + }; + + /** + * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + */ + CreateUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userListDirectLicense != null) { + if (typeof object.userListDirectLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.userListDirectLicense: object expected"); + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserListDirectLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userListDirectLicense = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) + object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); + return object; + }; + + /** + * Converts this CreateUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListDirectLicenseRequest"; + }; + + return CreateUserListDirectLicenseRequest; + })(); + + v1.GetUserListDirectLicenseRequest = (function() { + + /** + * Properties of a GetUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListDirectLicenseRequest + * @property {string|null} [name] GetUserListDirectLicenseRequest name + */ + + /** + * Constructs a new GetUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListDirectLicenseRequest. + * @implements IGetUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set + */ + function GetUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListDirectLicenseRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @instance + */ + GetUserListDirectLicenseRequest.prototype.name = ""; + + /** + * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest instance + */ + GetUserListDirectLicenseRequest.create = function create(properties) { + return new GetUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @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.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListDirectLicenseRequest.decode = function decode(reader, 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.GetUserListDirectLicenseRequest(); + 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 GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + */ + GetUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListDirectLicenseRequest"; + }; + + return GetUserListDirectLicenseRequest; + })(); + + v1.UpdateUserListDirectLicenseRequest = (function() { + + /** + * Properties of an UpdateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IUpdateUserListDirectLicenseRequest + * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] UpdateUserListDirectLicenseRequest userListDirectLicense + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListDirectLicenseRequest updateMask + */ + + /** + * Constructs a new UpdateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an UpdateUserListDirectLicenseRequest. + * @implements IUpdateUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set + */ + function UpdateUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserListDirectLicenseRequest userListDirectLicense. + * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + */ + UpdateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; + + /** + * UpdateUserListDirectLicenseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + */ + UpdateUserListDirectLicenseRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest instance + */ + UpdateUserListDirectLicenseRequest.create = function create(properties) { + return new UpdateUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListDirectLicenseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, 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 UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @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.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListDirectLicenseRequest.decode = function decode(reader, 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.UpdateUserListDirectLicenseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.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 UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserListDirectLicenseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); + if (error) + return "userListDirectLicense." + 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + */ + UpdateUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest(); + if (object.userListDirectLicense != null) { + if (typeof object.userListDirectLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.userListDirectLicense: object expected"); + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserListDirectLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userListDirectLicense = null; + object.updateMask = null; + } + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) + object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest"; + }; + + return UpdateUserListDirectLicenseRequest; + })(); + + v1.ListUserListDirectLicensesRequest = (function() { + + /** + * Properties of a ListUserListDirectLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListDirectLicensesRequest + * @property {string|null} [parent] ListUserListDirectLicensesRequest parent + * @property {string|null} [filter] ListUserListDirectLicensesRequest filter + * @property {number|null} [pageSize] ListUserListDirectLicensesRequest pageSize + * @property {string|null} [pageToken] ListUserListDirectLicensesRequest pageToken + */ + + /** + * Constructs a new ListUserListDirectLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListDirectLicensesRequest. + * @implements IListUserListDirectLicensesRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set + */ + function ListUserListDirectLicensesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListDirectLicensesRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.parent = ""; + + /** + * ListUserListDirectLicensesRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.filter = ""; + + /** + * ListUserListDirectLicensesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.pageSize = 0; + + /** + * ListUserListDirectLicensesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest instance + */ + ListUserListDirectLicensesRequest.create = function create(properties) { + return new ListUserListDirectLicensesRequest(properties); + }; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @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.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesRequest.decode = function decode(reader, 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.ListUserListDirectLicensesRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListDirectLicensesRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListDirectLicensesRequest.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.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 ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + */ + ListUserListDirectLicensesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListDirectLicensesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListDirectLicensesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListDirectLicensesRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListDirectLicensesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListDirectLicensesRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListDirectLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesRequest"; + }; + + return ListUserListDirectLicensesRequest; + })(); + + v1.ListUserListDirectLicensesResponse = (function() { + + /** + * Properties of a ListUserListDirectLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListDirectLicensesResponse + * @property {Array.|null} [userListDirectLicenses] ListUserListDirectLicensesResponse userListDirectLicenses + * @property {string|null} [nextPageToken] ListUserListDirectLicensesResponse nextPageToken + */ + + /** + * Constructs a new ListUserListDirectLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListDirectLicensesResponse. + * @implements IListUserListDirectLicensesResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set + */ + function ListUserListDirectLicensesResponse(properties) { + this.userListDirectLicenses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListDirectLicensesResponse userListDirectLicenses. + * @member {Array.} userListDirectLicenses + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + */ + ListUserListDirectLicensesResponse.prototype.userListDirectLicenses = $util.emptyArray; + + /** + * ListUserListDirectLicensesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + */ + ListUserListDirectLicensesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse instance + */ + ListUserListDirectLicensesResponse.create = function create(properties) { + return new ListUserListDirectLicensesResponse(properties); + }; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListDirectLicenses != null && message.userListDirectLicenses.length) + for (var i = 0; i < message.userListDirectLicenses.length; ++i) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicenses[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 ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @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.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesResponse.decode = function decode(reader, 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.ListUserListDirectLicensesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListDirectLicenses && message.userListDirectLicenses.length)) + message.userListDirectLicenses = []; + message.userListDirectLicenses.push($root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListDirectLicensesResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListDirectLicensesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListDirectLicenses != null && message.hasOwnProperty("userListDirectLicenses")) { + if (!Array.isArray(message.userListDirectLicenses)) + return "userListDirectLicenses: array expected"; + for (var i = 0; i < message.userListDirectLicenses.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicenses[i]); + if (error) + return "userListDirectLicenses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + */ + ListUserListDirectLicensesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse(); + if (object.userListDirectLicenses) { + if (!Array.isArray(object.userListDirectLicenses)) + throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: array expected"); + message.userListDirectLicenses = []; + for (var i = 0; i < object.userListDirectLicenses.length; ++i) { + if (typeof object.userListDirectLicenses[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: object expected"); + message.userListDirectLicenses[i] = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicenses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListDirectLicensesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListDirectLicenses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListDirectLicenses && message.userListDirectLicenses.length) { + object.userListDirectLicenses = []; + for (var j = 0; j < message.userListDirectLicenses.length; ++j) + object.userListDirectLicenses[j] = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicenses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListDirectLicensesResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListDirectLicensesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListDirectLicensesResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListDirectLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesResponse"; + }; + + return ListUserListDirectLicensesResponse; + })(); + + v1.UserListGlobalLicense = (function() { + + /** + * Properties of a UserListGlobalLicense. + * @memberof google.ads.datamanager.v1 + * @interface IUserListGlobalLicense + * @property {string|null} [name] UserListGlobalLicense name + * @property {number|Long|null} [userListId] UserListGlobalLicense userListId + * @property {string|null} [userListDisplayName] UserListGlobalLicense userListDisplayName + * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicense licenseType + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicense status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicense pricing + * @property {Array.|null} [historicalPricings] UserListGlobalLicense historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicense metrics + */ + + /** + * Constructs a new UserListGlobalLicense. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicense. + * @implements IUserListGlobalLicense + * @constructor + * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set + */ + function UserListGlobalLicense(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListGlobalLicense name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.name = ""; + + /** + * UserListGlobalLicense userListId. + * @member {number|Long|null|undefined} userListId + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.userListId = null; + + /** + * UserListGlobalLicense userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.userListDisplayName = ""; + + /** + * UserListGlobalLicense licenseType. + * @member {google.ads.datamanager.v1.UserListGlobalLicenseType|null|undefined} licenseType + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.licenseType = null; + + /** + * UserListGlobalLicense status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.status = null; + + /** + * UserListGlobalLicense pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.pricing = null; + + /** + * UserListGlobalLicense historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListGlobalLicense metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.metrics = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_userListId", { + get: $util.oneOfGetter($oneOfFields = ["userListId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_licenseType", { + get: $util.oneOfGetter($oneOfFields = ["licenseType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListGlobalLicense instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense instance + */ + UserListGlobalLicense.create = function create(properties) { + return new UserListGlobalLicense(properties); + }; + + /** + * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicense.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @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.UserListGlobalLicense} UserListGlobalLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicense.decode = function decode(reader, 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.UserListGlobalLicense(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.licenseType = reader.int32(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 8: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicense.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListGlobalLicense message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListGlobalLicense.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.userListId != null && message.hasOwnProperty("userListId")) { + properties._userListId = 1; + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) { + properties._licenseType = 1; + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense + */ + UserListGlobalLicense.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicense) + return object; + var message = new $root.google.ads.datamanager.v1.UserListGlobalLicense(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": + case 1: + message.licenseType = 1; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": + case 2: + message.licenseType = 2; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": + case 3: + message.licenseType = 3; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.UserListGlobalLicense} message UserListGlobalLicense + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListGlobalLicense.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + object.userListDisplayName = ""; + object.pricing = null; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) { + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (options.oneofs) + object._userListId = "userListId"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) { + object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; + if (options.oneofs) + object._licenseType = "licenseType"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListGlobalLicense to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + * @returns {Object.} JSON object + */ + UserListGlobalLicense.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListGlobalLicense + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListGlobalLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicense"; + }; + + return UserListGlobalLicense; + })(); + + v1.UserListGlobalLicenseCustomerInfo = (function() { + + /** + * Properties of a UserListGlobalLicenseCustomerInfo. + * @memberof google.ads.datamanager.v1 + * @interface IUserListGlobalLicenseCustomerInfo + * @property {string|null} [name] UserListGlobalLicenseCustomerInfo name + * @property {number|Long|null} [userListId] UserListGlobalLicenseCustomerInfo userListId + * @property {string|null} [userListDisplayName] UserListGlobalLicenseCustomerInfo userListDisplayName + * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicenseCustomerInfo licenseType + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicenseCustomerInfo status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicenseCustomerInfo pricing + * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListGlobalLicenseCustomerInfo clientAccountType + * @property {number|Long|null} [clientAccountId] UserListGlobalLicenseCustomerInfo clientAccountId + * @property {string|null} [clientAccountDisplayName] UserListGlobalLicenseCustomerInfo clientAccountDisplayName + * @property {Array.|null} [historicalPricings] UserListGlobalLicenseCustomerInfo historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicenseCustomerInfo metrics + */ + + /** + * Constructs a new UserListGlobalLicenseCustomerInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicenseCustomerInfo. + * @implements IUserListGlobalLicenseCustomerInfo + * @constructor + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set + */ + function UserListGlobalLicenseCustomerInfo(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListGlobalLicenseCustomerInfo name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.name = ""; + + /** + * UserListGlobalLicenseCustomerInfo userListId. + * @member {number|Long} userListId + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.userListId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListGlobalLicenseCustomerInfo userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.userListDisplayName = ""; + + /** + * UserListGlobalLicenseCustomerInfo licenseType. + * @member {google.ads.datamanager.v1.UserListGlobalLicenseType} licenseType + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.licenseType = 0; + + /** + * UserListGlobalLicenseCustomerInfo status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus} status + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.status = 0; + + /** + * UserListGlobalLicenseCustomerInfo pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.pricing = null; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountType. + * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType} clientAccountType + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountType = 0; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountId. + * @member {number|Long} clientAccountId + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountDisplayName. + * @member {string} clientAccountDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountDisplayName = ""; + + /** + * UserListGlobalLicenseCustomerInfo historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListGlobalLicenseCustomerInfo metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.metrics = null; + + /** + * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo instance + */ + UserListGlobalLicenseCustomerInfo.create = function create(properties) { + return new UserListGlobalLicenseCustomerInfo(properties); + }; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicenseCustomerInfo.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.clientAccountType); + if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.clientAccountId); + if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clientAccountDisplayName); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicenseCustomerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @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.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicenseCustomerInfo.decode = function decode(reader, 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.UserListGlobalLicenseCustomerInfo(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.licenseType = reader.int32(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 7: { + message.clientAccountType = reader.int32(); + break; + } + case 8: { + message.clientAccountId = reader.int64(); + break; + } + case 9: { + message.clientAccountDisplayName = reader.string(); + break; + } + case 10: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 11: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicenseCustomerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListGlobalLicenseCustomerInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListGlobalLicenseCustomerInfo.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.userListId != null && message.hasOwnProperty("userListId")) + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) + switch (message.clientAccountType) { + default: + return "clientAccountType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) + if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) + return "clientAccountId: integer|Long expected"; + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + if (!$util.isString(message.clientAccountDisplayName)) + return "clientAccountDisplayName: string expected"; + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + */ + UserListGlobalLicenseCustomerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo) + return object; + var message = new $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": + case 1: + message.licenseType = 1; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": + case 2: + message.licenseType = 2; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": + case 3: + message.licenseType = 3; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + switch (object.clientAccountType) { + default: + if (typeof object.clientAccountType === "number") { + message.clientAccountType = object.clientAccountType; + break; + } + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": + case 0: + message.clientAccountType = 0; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": + case 1: + message.clientAccountType = 1; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": + case 2: + message.clientAccountType = 2; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": + case 3: + message.clientAccountType = 3; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 4: + message.clientAccountType = 4; + break; + } + if (object.clientAccountId != null) + if ($util.Long) + (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; + else if (typeof object.clientAccountId === "string") + message.clientAccountId = parseInt(object.clientAccountId, 10); + else if (typeof object.clientAccountId === "number") + message.clientAccountId = object.clientAccountId; + else if (typeof object.clientAccountId === "object") + message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); + if (object.clientAccountDisplayName != null) + message.clientAccountDisplayName = String(object.clientAccountDisplayName); + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListGlobalLicenseCustomerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userListId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userListId = options.longs === String ? "0" : 0; + object.userListDisplayName = ""; + object.licenseType = options.enums === String ? "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED" : 0; + object.status = options.enums === String ? "USER_LIST_LICENSE_STATUS_UNSPECIFIED" : 0; + object.pricing = null; + object.clientAccountType = options.enums === String ? "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.clientAccountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.clientAccountId = options.longs === String ? "0" : 0; + object.clientAccountDisplayName = ""; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) + object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) + if (typeof message.clientAccountId === "number") + object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; + else + object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + object.clientAccountDisplayName = message.clientAccountDisplayName; + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListGlobalLicenseCustomerInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + * @returns {Object.} JSON object + */ + UserListGlobalLicenseCustomerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListGlobalLicenseCustomerInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListGlobalLicenseCustomerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo"; + }; + + return UserListGlobalLicenseCustomerInfo; + })(); + + /** + * UserListGlobalLicenseType enum. + * @name google.ads.datamanager.v1.UserListGlobalLicenseType + * @enum {number} + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED=0 USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER=1 USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE=2 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE=3 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE value + */ + v1.UserListGlobalLicenseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER"] = 1; + values[valuesById[2] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE"] = 2; + values[valuesById[3] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE"] = 3; + return values; + })(); + + v1.UserListGlobalLicenseService = (function() { + + /** + * Constructs a new UserListGlobalLicenseService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicenseService + * @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 UserListGlobalLicenseService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListGlobalLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListGlobalLicenseService; + + /** + * Creates new UserListGlobalLicenseService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @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 {UserListGlobalLicenseService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListGlobalLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef CreateUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls CreateUserListGlobalLicense. + * @function createUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.createUserListGlobalLicense = function createUserListGlobalLicense(request, callback) { + return this.rpcCall(createUserListGlobalLicense, $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "CreateUserListGlobalLicense" }); + + /** + * Calls CreateUserListGlobalLicense. + * @function createUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef UpdateUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls UpdateUserListGlobalLicense. + * @function updateUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.updateUserListGlobalLicense = function updateUserListGlobalLicense(request, callback) { + return this.rpcCall(updateUserListGlobalLicense, $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "UpdateUserListGlobalLicense" }); + + /** + * Calls UpdateUserListGlobalLicense. + * @function updateUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef GetUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls GetUserListGlobalLicense. + * @function getUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.getUserListGlobalLicense = function getUserListGlobalLicense(request, callback) { + return this.rpcCall(getUserListGlobalLicense, $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "GetUserListGlobalLicense" }); + + /** + * Calls GetUserListGlobalLicense. + * @function getUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef ListUserListGlobalLicensesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} [response] ListUserListGlobalLicensesResponse + */ + + /** + * Calls ListUserListGlobalLicenses. + * @function listUserListGlobalLicenses + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenses = function listUserListGlobalLicenses(request, callback) { + return this.rpcCall(listUserListGlobalLicenses, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, request, callback); + }, "name", { value: "ListUserListGlobalLicenses" }); + + /** + * Calls ListUserListGlobalLicenses. + * @function listUserListGlobalLicenses + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef ListUserListGlobalLicenseCustomerInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} [response] ListUserListGlobalLicenseCustomerInfosResponse + */ + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @function listUserListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenseCustomerInfos = function listUserListGlobalLicenseCustomerInfos(request, callback) { + return this.rpcCall(listUserListGlobalLicenseCustomerInfos, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, request, callback); + }, "name", { value: "ListUserListGlobalLicenseCustomerInfos" }); + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @function listUserListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListGlobalLicenseService; + })(); + + v1.CreateUserListGlobalLicenseRequest = (function() { + + /** + * Properties of a CreateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreateUserListGlobalLicenseRequest + * @property {string|null} [parent] CreateUserListGlobalLicenseRequest parent + * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] CreateUserListGlobalLicenseRequest userListGlobalLicense + */ + + /** + * Constructs a new CreateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreateUserListGlobalLicenseRequest. + * @implements ICreateUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function CreateUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserListGlobalLicenseRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + */ + CreateUserListGlobalLicenseRequest.prototype.parent = ""; + + /** + * CreateUserListGlobalLicenseRequest userListGlobalLicense. + * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + */ + CreateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; + + /** + * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest instance + */ + CreateUserListGlobalLicenseRequest.create = function create(properties) { + return new CreateUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @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.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListGlobalLicenseRequest.decode = function decode(reader, 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.CreateUserListGlobalLicenseRequest(); + 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.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); + if (error) + return "userListGlobalLicense." + error; + } + return null; + }; + + /** + * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + */ + CreateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userListGlobalLicense != null) { + if (typeof object.userListGlobalLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userListGlobalLicense = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) + object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); + return object; + }; + + /** + * Converts this CreateUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest"; + }; + + return CreateUserListGlobalLicenseRequest; + })(); + + v1.UpdateUserListGlobalLicenseRequest = (function() { + + /** + * Properties of an UpdateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IUpdateUserListGlobalLicenseRequest + * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] UpdateUserListGlobalLicenseRequest userListGlobalLicense + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListGlobalLicenseRequest updateMask + */ + + /** + * Constructs a new UpdateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an UpdateUserListGlobalLicenseRequest. + * @implements IUpdateUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function UpdateUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserListGlobalLicenseRequest userListGlobalLicense. + * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + */ + UpdateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; + + /** + * UpdateUserListGlobalLicenseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + */ + UpdateUserListGlobalLicenseRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest instance + */ + UpdateUserListGlobalLicenseRequest.create = function create(properties) { + return new UpdateUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListGlobalLicenseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, 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 UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @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.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListGlobalLicenseRequest.decode = function decode(reader, 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.UpdateUserListGlobalLicenseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.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 UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserListGlobalLicenseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); + if (error) + return "userListGlobalLicense." + 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + */ + UpdateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest(); + if (object.userListGlobalLicense != null) { + if (typeof object.userListGlobalLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userListGlobalLicense = null; + object.updateMask = null; + } + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) + object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest"; + }; + + return UpdateUserListGlobalLicenseRequest; + })(); + + v1.GetUserListGlobalLicenseRequest = (function() { + + /** + * Properties of a GetUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListGlobalLicenseRequest + * @property {string|null} [name] GetUserListGlobalLicenseRequest name + */ + + /** + * Constructs a new GetUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListGlobalLicenseRequest. + * @implements IGetUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function GetUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListGlobalLicenseRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @instance + */ + GetUserListGlobalLicenseRequest.prototype.name = ""; + + /** + * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest instance + */ + GetUserListGlobalLicenseRequest.create = function create(properties) { + return new GetUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @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.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListGlobalLicenseRequest.decode = function decode(reader, 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.GetUserListGlobalLicenseRequest(); + 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 GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + */ + GetUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListGlobalLicenseRequest"; + }; + + return GetUserListGlobalLicenseRequest; + })(); + + v1.ListUserListGlobalLicensesRequest = (function() { + + /** + * Properties of a ListUserListGlobalLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicensesRequest + * @property {string|null} [parent] ListUserListGlobalLicensesRequest parent + * @property {string|null} [filter] ListUserListGlobalLicensesRequest filter + * @property {number|null} [pageSize] ListUserListGlobalLicensesRequest pageSize + * @property {string|null} [pageToken] ListUserListGlobalLicensesRequest pageToken + */ + + /** + * Constructs a new ListUserListGlobalLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicensesRequest. + * @implements IListUserListGlobalLicensesRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set + */ + function ListUserListGlobalLicensesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicensesRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.parent = ""; + + /** + * ListUserListGlobalLicensesRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.filter = ""; + + /** + * ListUserListGlobalLicensesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.pageSize = 0; + + /** + * ListUserListGlobalLicensesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest instance + */ + ListUserListGlobalLicensesRequest.create = function create(properties) { + return new ListUserListGlobalLicensesRequest(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @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.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesRequest.decode = function decode(reader, 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.ListUserListGlobalLicensesRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicensesRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicensesRequest.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.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 ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + */ + ListUserListGlobalLicensesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicensesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListGlobalLicensesRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicensesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicensesRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesRequest"; + }; + + return ListUserListGlobalLicensesRequest; + })(); + + v1.ListUserListGlobalLicensesResponse = (function() { + + /** + * Properties of a ListUserListGlobalLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicensesResponse + * @property {Array.|null} [userListGlobalLicenses] ListUserListGlobalLicensesResponse userListGlobalLicenses + * @property {string|null} [nextPageToken] ListUserListGlobalLicensesResponse nextPageToken + */ + + /** + * Constructs a new ListUserListGlobalLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicensesResponse. + * @implements IListUserListGlobalLicensesResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set + */ + function ListUserListGlobalLicensesResponse(properties) { + this.userListGlobalLicenses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicensesResponse userListGlobalLicenses. + * @member {Array.} userListGlobalLicenses + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + */ + ListUserListGlobalLicensesResponse.prototype.userListGlobalLicenses = $util.emptyArray; + + /** + * ListUserListGlobalLicensesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + */ + ListUserListGlobalLicensesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse instance + */ + ListUserListGlobalLicensesResponse.create = function create(properties) { + return new ListUserListGlobalLicensesResponse(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicenses != null && message.userListGlobalLicenses.length) + for (var i = 0; i < message.userListGlobalLicenses.length; ++i) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicenses[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 ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @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.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesResponse.decode = function decode(reader, 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.ListUserListGlobalLicensesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListGlobalLicenses && message.userListGlobalLicenses.length)) + message.userListGlobalLicenses = []; + message.userListGlobalLicenses.push($root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicensesResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicensesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicenses != null && message.hasOwnProperty("userListGlobalLicenses")) { + if (!Array.isArray(message.userListGlobalLicenses)) + return "userListGlobalLicenses: array expected"; + for (var i = 0; i < message.userListGlobalLicenses.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicenses[i]); + if (error) + return "userListGlobalLicenses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + */ + ListUserListGlobalLicensesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse(); + if (object.userListGlobalLicenses) { + if (!Array.isArray(object.userListGlobalLicenses)) + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: array expected"); + message.userListGlobalLicenses = []; + for (var i = 0; i < object.userListGlobalLicenses.length; ++i) { + if (typeof object.userListGlobalLicenses[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: object expected"); + message.userListGlobalLicenses[i] = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicenses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicensesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListGlobalLicenses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListGlobalLicenses && message.userListGlobalLicenses.length) { + object.userListGlobalLicenses = []; + for (var j = 0; j < message.userListGlobalLicenses.length; ++j) + object.userListGlobalLicenses[j] = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicenses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListGlobalLicensesResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicensesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicensesResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesResponse"; + }; + + return ListUserListGlobalLicensesResponse; + })(); + + v1.ListUserListGlobalLicenseCustomerInfosRequest = (function() { + + /** + * Properties of a ListUserListGlobalLicenseCustomerInfosRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicenseCustomerInfosRequest + * @property {string|null} [parent] ListUserListGlobalLicenseCustomerInfosRequest parent + * @property {string|null} [filter] ListUserListGlobalLicenseCustomerInfosRequest filter + * @property {number|null} [pageSize] ListUserListGlobalLicenseCustomerInfosRequest pageSize + * @property {string|null} [pageToken] ListUserListGlobalLicenseCustomerInfosRequest pageToken + */ + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosRequest. + * @implements IListUserListGlobalLicenseCustomerInfosRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set + */ + function ListUserListGlobalLicenseCustomerInfosRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicenseCustomerInfosRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.parent = ""; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.filter = ""; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageSize = 0; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.create = function create(properties) { + return new ListUserListGlobalLicenseCustomerInfosRequest(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @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.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosRequest.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicenseCustomerInfosRequest.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.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 ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + */ + ListUserListGlobalLicenseCustomerInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicenseCustomerInfosRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicenseCustomerInfosRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest"; + }; + + return ListUserListGlobalLicenseCustomerInfosRequest; + })(); + + v1.ListUserListGlobalLicenseCustomerInfosResponse = (function() { + + /** + * Properties of a ListUserListGlobalLicenseCustomerInfosResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicenseCustomerInfosResponse + * @property {Array.|null} [userListGlobalLicenseCustomerInfos] ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos + * @property {string|null} [nextPageToken] ListUserListGlobalLicenseCustomerInfosResponse nextPageToken + */ + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosResponse. + * @implements IListUserListGlobalLicenseCustomerInfosResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set + */ + function ListUserListGlobalLicenseCustomerInfosResponse(properties) { + this.userListGlobalLicenseCustomerInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. + * @member {Array.} userListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.userListGlobalLicenseCustomerInfos = $util.emptyArray; + + /** + * ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.create = function create(properties) { + return new ListUserListGlobalLicenseCustomerInfosResponse(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicenseCustomerInfos != null && message.userListGlobalLicenseCustomerInfos.length) + for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) + $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.encode(message.userListGlobalLicenseCustomerInfos[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 ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @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.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosResponse.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length)) + message.userListGlobalLicenseCustomerInfos = []; + message.userListGlobalLicenseCustomerInfos.push($root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicenseCustomerInfosResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicenseCustomerInfos != null && message.hasOwnProperty("userListGlobalLicenseCustomerInfos")) { + if (!Array.isArray(message.userListGlobalLicenseCustomerInfos)) + return "userListGlobalLicenseCustomerInfos: array expected"; + for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify(message.userListGlobalLicenseCustomerInfos[i]); + if (error) + return "userListGlobalLicenseCustomerInfos." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + */ + ListUserListGlobalLicenseCustomerInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse(); + if (object.userListGlobalLicenseCustomerInfos) { + if (!Array.isArray(object.userListGlobalLicenseCustomerInfos)) + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: array expected"); + message.userListGlobalLicenseCustomerInfos = []; + for (var i = 0; i < object.userListGlobalLicenseCustomerInfos.length; ++i) { + if (typeof object.userListGlobalLicenseCustomerInfos[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: object expected"); + message.userListGlobalLicenseCustomerInfos[i] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.fromObject(object.userListGlobalLicenseCustomerInfos[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicenseCustomerInfosResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListGlobalLicenseCustomerInfos = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length) { + object.userListGlobalLicenseCustomerInfos = []; + for (var j = 0; j < message.userListGlobalLicenseCustomerInfos.length; ++j) + object.userListGlobalLicenseCustomerInfos[j] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.toObject(message.userListGlobalLicenseCustomerInfos[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicenseCustomerInfosResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse"; + }; + + return ListUserListGlobalLicenseCustomerInfosResponse; + })(); + + v1.UserListService = (function() { + + /** + * Constructs a new UserListService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListService + * @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 UserListService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListService; + + /** + * Creates new UserListService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListService + * @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 {UserListService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef GetUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls GetUserList. + * @function getUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.GetUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.getUserList = function getUserList(request, callback) { + return this.rpcCall(getUserList, $root.google.ads.datamanager.v1.GetUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "GetUserList" }); + + /** + * Calls GetUserList. + * @function getUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef ListUserListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListsResponse} [response] ListUserListsResponse + */ + + /** + * Calls ListUserLists. + * @function listUserLists + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.ListUserListsCallback} callback Node-style callback called with the error, if any, and ListUserListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.listUserLists = function listUserLists(request, callback) { + return this.rpcCall(listUserLists, $root.google.ads.datamanager.v1.ListUserListsRequest, $root.google.ads.datamanager.v1.ListUserListsResponse, request, callback); + }, "name", { value: "ListUserLists" }); + + /** + * Calls ListUserLists. + * @function listUserLists + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef CreateUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls CreateUserList. + * @function createUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.CreateUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.createUserList = function createUserList(request, callback) { + return this.rpcCall(createUserList, $root.google.ads.datamanager.v1.CreateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "CreateUserList" }); + + /** + * Calls CreateUserList. + * @function createUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef UpdateUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls UpdateUserList. + * @function updateUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.UpdateUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.updateUserList = function updateUserList(request, callback) { + return this.rpcCall(updateUserList, $root.google.ads.datamanager.v1.UpdateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "UpdateUserList" }); + + /** + * Calls UpdateUserList. + * @function updateUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef DeleteUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserList. + * @function deleteUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.DeleteUserListCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.deleteUserList = function deleteUserList(request, callback) { + return this.rpcCall(deleteUserList, $root.google.ads.datamanager.v1.DeleteUserListRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserList" }); + + /** + * Calls DeleteUserList. + * @function deleteUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListService; + })(); + + v1.GetUserListRequest = (function() { + + /** + * Properties of a GetUserListRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListRequest + * @property {string|null} [name] GetUserListRequest name + */ + + /** + * Constructs a new GetUserListRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListRequest. + * @implements IGetUserListRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set + */ + function GetUserListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @instance + */ + GetUserListRequest.prototype.name = ""; + + /** + * Creates a new GetUserListRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest instance + */ + GetUserListRequest.create = function create(properties) { + return new GetUserListRequest(properties); + }; + + /** + * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListRequest.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 GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @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.GetUserListRequest} GetUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListRequest.decode = function decode(reader, 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.GetUserListRequest(); + 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 GetUserListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListRequest.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 GetUserListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest + */ + GetUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListRequest} message GetUserListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListRequest.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 GetUserListRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListRequest"; + }; + + return GetUserListRequest; + })(); + + v1.ListUserListsRequest = (function() { + + /** + * Properties of a ListUserListsRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListsRequest + * @property {string|null} [parent] ListUserListsRequest parent + * @property {number|null} [pageSize] ListUserListsRequest pageSize + * @property {string|null} [pageToken] ListUserListsRequest pageToken + * @property {string|null} [filter] ListUserListsRequest filter + */ + + /** + * Constructs a new ListUserListsRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListsRequest. + * @implements IListUserListsRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set + */ + function ListUserListsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListsRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.parent = ""; + + /** + * ListUserListsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.pageSize = 0; + + /** + * ListUserListsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.pageToken = ""; + + /** + * ListUserListsRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.filter = ""; + + /** + * Creates a new ListUserListsRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest instance + */ + ListUserListsRequest.create = function create(properties) { + return new ListUserListsRequest(properties); + }; + + /** + * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @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.ListUserListsRequest} ListUserListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsRequest.decode = function decode(reader, 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.ListUserListsRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListsRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListsRequest.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"; + return null; + }; + + /** + * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest + */ + ListUserListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListsRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListsRequest} message ListUserListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListUserListsRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListsRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsRequest"; + }; + + return ListUserListsRequest; + })(); + + v1.ListUserListsResponse = (function() { + + /** + * Properties of a ListUserListsResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListsResponse + * @property {Array.|null} [userLists] ListUserListsResponse userLists + * @property {string|null} [nextPageToken] ListUserListsResponse nextPageToken + */ + + /** + * Constructs a new ListUserListsResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListsResponse. + * @implements IListUserListsResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set + */ + function ListUserListsResponse(properties) { + this.userLists = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListsResponse userLists. + * @member {Array.} userLists + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @instance + */ + ListUserListsResponse.prototype.userLists = $util.emptyArray; + + /** + * ListUserListsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @instance + */ + ListUserListsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListsResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse instance + */ + ListUserListsResponse.create = function create(properties) { + return new ListUserListsResponse(properties); + }; + + /** + * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLists != null && message.userLists.length) + for (var i = 0; i < message.userLists.length; ++i) + $root.google.ads.datamanager.v1.UserList.encode(message.userLists[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 ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @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.ListUserListsResponse} ListUserListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsResponse.decode = function decode(reader, 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.ListUserListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userLists && message.userLists.length)) + message.userLists = []; + message.userLists.push($root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListsResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLists != null && message.hasOwnProperty("userLists")) { + if (!Array.isArray(message.userLists)) + return "userLists: array expected"; + for (var i = 0; i < message.userLists.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userLists[i]); + if (error) + return "userLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse + */ + ListUserListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListsResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListsResponse(); + if (object.userLists) { + if (!Array.isArray(object.userLists)) + throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: array expected"); + message.userLists = []; + for (var i = 0; i < object.userLists.length; ++i) { + if (typeof object.userLists[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: object expected"); + message.userLists[i] = $root.google.ads.datamanager.v1.UserList.fromObject(object.userLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListsResponse} message ListUserListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLists = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userLists && message.userLists.length) { + object.userLists = []; + for (var j = 0; j < message.userLists.length; ++j) + object.userLists[j] = $root.google.ads.datamanager.v1.UserList.toObject(message.userLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListsResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListsResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsResponse"; + }; + + return ListUserListsResponse; + })(); + + v1.CreateUserListRequest = (function() { + + /** + * Properties of a CreateUserListRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreateUserListRequest + * @property {string|null} [parent] CreateUserListRequest parent + * @property {google.ads.datamanager.v1.IUserList|null} [userList] CreateUserListRequest userList + * @property {boolean|null} [validateOnly] CreateUserListRequest validateOnly + */ + + /** + * Constructs a new CreateUserListRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreateUserListRequest. + * @implements ICreateUserListRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set + */ + function CreateUserListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserListRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + */ + CreateUserListRequest.prototype.parent = ""; + + /** + * CreateUserListRequest userList. + * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + */ + CreateUserListRequest.prototype.userList = null; + + /** + * CreateUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + */ + CreateUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateUserListRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest instance + */ + CreateUserListRequest.create = function create(properties) { + return new CreateUserListRequest(properties); + }; + + /** + * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListRequest.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.userList != null && Object.hasOwnProperty.call(message, "userList")) + $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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); + return writer; + }; + + /** + * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @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.CreateUserListRequest} CreateUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListRequest.decode = function decode(reader, 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.CreateUserListRequest(); + 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.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserListRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserListRequest.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.userList != null && message.hasOwnProperty("userList")) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); + if (error) + return "userList." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest + */ + CreateUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreateUserListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userList != null) { + if (typeof object.userList !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListRequest.userList: object expected"); + message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {google.ads.datamanager.v1.CreateUserListRequest} message CreateUserListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userList = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userList != null && message.hasOwnProperty("userList")) + object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateUserListRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserListRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListRequest"; + }; + + return CreateUserListRequest; + })(); + + v1.UpdateUserListRequest = (function() { + + /** + * Properties of an UpdateUserListRequest. + * @memberof google.ads.datamanager.v1 + * @interface IUpdateUserListRequest + * @property {google.ads.datamanager.v1.IUserList|null} [userList] UpdateUserListRequest userList + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListRequest updateMask + * @property {boolean|null} [validateOnly] UpdateUserListRequest validateOnly + */ + + /** + * Constructs a new UpdateUserListRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an UpdateUserListRequest. + * @implements IUpdateUserListRequest + * @constructor + * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set + */ + function UpdateUserListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserListRequest userList. + * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @instance + */ + UpdateUserListRequest.prototype.userList = null; + + /** + * UpdateUserListRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @instance + */ + UpdateUserListRequest.prototype.updateMask = null; + + /** + * UpdateUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @instance + */ + UpdateUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateUserListRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest instance + */ + UpdateUserListRequest.create = function create(properties) { + return new UpdateUserListRequest(properties); + }; + + /** + * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userList != null && Object.hasOwnProperty.call(message, "userList")) + $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @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.UpdateUserListRequest} UpdateUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListRequest.decode = function decode(reader, 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.UpdateUserListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserListRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userList != null && message.hasOwnProperty("userList")) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); + if (error) + return "userList." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest + */ + UpdateUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListRequest) + return object; + var message = new $root.google.ads.datamanager.v1.UpdateUserListRequest(); + if (object.userList != null) { + if (typeof object.userList !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.userList: object expected"); + message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {google.ads.datamanager.v1.UpdateUserListRequest} message UpdateUserListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userList = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.userList != null && message.hasOwnProperty("userList")) + object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateUserListRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserListRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListRequest"; + }; + + return UpdateUserListRequest; + })(); + + v1.DeleteUserListRequest = (function() { + + /** + * Properties of a DeleteUserListRequest. + * @memberof google.ads.datamanager.v1 + * @interface IDeleteUserListRequest + * @property {string|null} [name] DeleteUserListRequest name + * @property {boolean|null} [validateOnly] DeleteUserListRequest validateOnly + */ + + /** + * Constructs a new DeleteUserListRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a DeleteUserListRequest. + * @implements IDeleteUserListRequest + * @constructor + * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set + */ + function DeleteUserListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserListRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @instance + */ + DeleteUserListRequest.prototype.name = ""; + + /** + * DeleteUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @instance + */ + DeleteUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteUserListRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest instance + */ + DeleteUserListRequest.create = function create(properties) { + return new DeleteUserListRequest(properties); + }; + + /** + * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserListRequest.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @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.DeleteUserListRequest} DeleteUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserListRequest.decode = function decode(reader, 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.DeleteUserListRequest(); + 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.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserListRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserListRequest.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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest + */ + DeleteUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.DeleteUserListRequest) + return object; + var message = new $root.google.ads.datamanager.v1.DeleteUserListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {google.ads.datamanager.v1.DeleteUserListRequest} message DeleteUserListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteUserListRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserListRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.DeleteUserListRequest"; + }; + + return DeleteUserListRequest; + })(); + + 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.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; + })(); + + 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 + * @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 + */ + + /** + * 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; + })(); + + 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.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-ads-datamanager/protos/protos.json b/owl-bot-staging/google-ads-datamanager/protos/protos.json new file mode 100644 index 00000000000..2fefbf18e39 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/protos/protos.json @@ -0,0 +1,5456 @@ +{ + "nested": { + "google": { + "nested": { + "ads": { + "nested": { + "datamanager": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Ads.DataManager.V1", + "go_package": "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb", + "java_multiple_files": true, + "java_outer_classname": "UserListServiceProto", + "java_package": "com.google.ads.datamanager.v1", + "php_namespace": "Google\\Ads\\DataManager\\V1", + "ruby_package": "Google::Ads::DataManager::V1", + "(google.api.resource_definition).type": "datamanager.googleapis.com/Account", + "(google.api.resource_definition).pattern": "accountTypes/{account_type}/accounts/{account}" + }, + "nested": { + "AgeRange": { + "values": { + "AGE_RANGE_UNSPECIFIED": 0, + "AGE_RANGE_UNKNOWN": 1, + "AGE_RANGE_18_24": 2, + "AGE_RANGE_25_34": 3, + "AGE_RANGE_35_44": 4, + "AGE_RANGE_45_54": 5, + "AGE_RANGE_55_64": 6, + "AGE_RANGE_65_UP": 7 + } + }, + "AudienceMember": { + "oneofs": { + "data": { + "oneof": [ + "userData", + "pairData", + "mobileData", + "userIdData", + "ppidData" + ] + } + }, + "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 + }, + "userIdData": { + "type": "UserIdData", + "id": 6 + }, + "ppidData": { + "type": "PpidData", + "id": 7 + }, + "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" + } + } + } + }, + "UserIdData": { + "fields": { + "userId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PpidData": { + "fields": { + "ppids": { + "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" + } + }, + "itemId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "additionalItemParameters": { + "rule": "repeated", + "type": "ItemParameter", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ItemParameter": { + "fields": { + "parameterName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "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, + "GOOGLE_ANALYTICS_PROPERTY": 5, + "GOOGLE_AD_MANAGER_AUDIENCE_LINK": 6 + } + } + } + }, + "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", + "awsWrappedKeyInfo" + ] + } + }, + "fields": { + "gcpWrappedKeyInfo": { + "type": "GcpWrappedKeyInfo", + "id": 1 + }, + "awsWrappedKeyInfo": { + "type": "AwsWrappedKeyInfo", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "AwsWrappedKeyInfo": { + "fields": { + "keyType": { + "type": "KeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "roleArn": { + "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, + "UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER": 37, + "UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER": 38, + "NO_IDENTIFIERS_PROVIDED": 39, + "INVALID_PROPERTY_TYPE": 40, + "INVALID_STREAM_TYPE": 41, + "LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT": 42, + "OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH": 43, + "EVENT_TIME_INVALID": 44, + "RESERVED_NAME_USED": 45, + "INVALID_EVENT_NAME": 46, + "NOT_ALLOWLISTED": 47, + "INVALID_REQUEST_ID": 48, + "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT": 49, + "FIELD_VALUE_TOO_LONG": 50, + "TOO_MANY_ELEMENTS": 51, + "ALREADY_EXISTS": 52, + "IMMUTABLE_FIELD_FOR_UPDATE": 53, + "INVALID_RESOURCE_NAME": 54, + "INVALID_FILTER": 55, + "INVALID_UPDATE_MASK": 56, + "INVALID_PAGE_TOKEN": 57, + "CANNOT_UPDATE_DISABLED_LICENSE": 58, + "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST": 59, + "INSUFFICIENT_COST": 60, + "CANNOT_DISABLE_LICENSE": 61, + "INVALID_CLIENT_ACCOUNT_ID": 62, + "PRICING_ONLY_ZERO_COST_ALLOWED": 63, + "PRICE_TOO_HIGH": 64, + "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE": 65, + "INVALID_PRICING_END_DATE": 66, + "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT": 67, + "MISMATCHED_ACCOUNT_TYPE": 68, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE": 69, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER": 70, + "INVALID_MEDIA_SHARE_COST": 71, + "INVALID_COST_TYPE": 72, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST": 73, + "MAX_COST_NOT_ALLOWED": 74, + "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED": 75, + "INVALID_DESCRIPTION": 76, + "INVALID_DISPLAY_NAME": 77, + "DISPLAY_NAME_ALREADY_USED": 78, + "OWNERSHIP_REQUIRED_FOR_UPDATE": 79, + "USER_LIST_MUTATION_NOT_SUPPORTED": 80, + "SENSITIVE_USER_LIST_IMMUTABLE": 81, + "BILLABLE_RECORD_COUNT_IMMUTABLE": 82, + "USER_LIST_NAME_RESERVED": 83, + "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA": 84, + "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE": 85, + "COMMERCE_PARTNER_NOT_ALLOWED": 86, + "UNSUPPORTED_PARTNER_AUDIENCE_INFO": 87, + "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED": 88, + "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 89, + "ADVERTISER_TOS_NOT_ACCEPTED": 90, + "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 91, + "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT": 92, + "INVALID_COMMERCE_PARTNER": 93, + "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE": 94, + "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES": 95, + "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG": 96, + "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE": 97, + "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK": 98 + } + }, + "Event": { + "oneofs": { + "_conversionValue": { + "oneof": [ + "conversionValue" + ] + } + }, + "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", + "proto3_optional": true + } + }, + "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" + } + }, + "eventName": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clientId": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userId": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "additionalEventParameters": { + "rule": "repeated", + "type": "EventParameter", + "id": 19, + "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" + } + } + } + }, + "EventParameter": { + "fields": { + "parameterName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "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" + } + }, + "additionalUserProperties": { + "rule": "repeated", + "type": "UserProperty", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UserProperty": { + "fields": { + "propertyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "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 + } + }, + "Gender": { + "values": { + "GENDER_UNSPECIFIED": 0, + "GENDER_UNKNOWN": 1, + "GENDER_MALE": 2, + "GENDER_FEMALE": 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", + "userIdDataIngestionStatus", + "ppidDataIngestionStatus" + ] + } + }, + "fields": { + "userDataIngestionStatus": { + "type": "IngestUserDataStatus", + "id": 1 + }, + "mobileDataIngestionStatus": { + "type": "IngestMobileDataStatus", + "id": 2 + }, + "pairDataIngestionStatus": { + "type": "IngestPairDataStatus", + "id": 3 + }, + "userIdDataIngestionStatus": { + "type": "IngestUserIdDataStatus", + "id": 4 + }, + "ppidDataIngestionStatus": { + "type": "IngestPpidDataStatus", + "id": 5 + } + } + }, + "RemoveAudienceMembersStatus": { + "oneofs": { + "status": { + "oneof": [ + "userDataRemovalStatus", + "mobileDataRemovalStatus", + "pairDataRemovalStatus", + "userIdDataRemovalStatus", + "ppidDataRemovalStatus" + ] + } + }, + "fields": { + "userDataRemovalStatus": { + "type": "RemoveUserDataStatus", + "id": 1 + }, + "mobileDataRemovalStatus": { + "type": "RemoveMobileDataStatus", + "id": 2 + }, + "pairDataRemovalStatus": { + "type": "RemovePairDataStatus", + "id": 3 + }, + "userIdDataRemovalStatus": { + "type": "RemoveUserIdDataStatus", + "id": 4 + }, + "ppidDataRemovalStatus": { + "type": "RemovePpidDataStatus", + "id": 5 + } + } + }, + "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 + } + } + }, + "IngestUserIdDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemoveUserIdDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "IngestPpidDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "ppidCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemovePpidDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "ppidCount": { + "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_AWS_AUTH_FAILED": 27, + "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, + "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": 9 + } + }, + "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 + } + }, + "MarketingDataInsightsService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "RetrieveInsights": { + "requestType": "RetrieveInsightsRequest", + "responseType": "RetrieveInsightsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", + "body": "*" + } + } + ] + } + } + }, + "RetrieveInsightsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "baseline": { + "type": "Baseline", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "userListId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Baseline": { + "oneofs": { + "baseline": { + "oneof": [ + "baselineLocation", + "locationAutoDetectionEnabled" + ] + } + }, + "fields": { + "baselineLocation": { + "type": "Location", + "id": 1 + }, + "locationAutoDetectionEnabled": { + "type": "bool", + "id": 2 + } + }, + "nested": { + "Location": { + "fields": { + "regionCodes": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "RetrieveInsightsResponse": { + "fields": { + "marketingDataInsights": { + "rule": "repeated", + "type": "MarketingDataInsight", + "id": 1 + } + }, + "nested": { + "MarketingDataInsight": { + "fields": { + "dimension": { + "type": "AudienceInsightsDimension", + "id": 1 + }, + "attributes": { + "rule": "repeated", + "type": "MarketingDataInsightsAttribute", + "id": 2 + } + }, + "nested": { + "AudienceInsightsDimension": { + "values": { + "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": 0, + "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": 1, + "AFFINITY_USER_INTEREST": 2, + "IN_MARKET_USER_INTEREST": 3, + "AGE_RANGE": 4, + "GENDER": 5 + } + }, + "MarketingDataInsightsAttribute": { + "oneofs": { + "_userInterestId": { + "oneof": [ + "userInterestId" + ] + }, + "_lift": { + "oneof": [ + "lift" + ] + }, + "_ageRange": { + "oneof": [ + "ageRange" + ] + }, + "_gender": { + "oneof": [ + "gender" + ] + } + }, + "fields": { + "userInterestId": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "lift": { + "type": "float", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "ageRange": { + "type": "AgeRange", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "gender": { + "type": "Gender", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + } + } + } + } + }, + "PartnerLinkService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreatePartnerLink": { + "requestType": "CreatePartnerLinkRequest", + "responseType": "PartnerLink", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", + "(google.api.http).body": "partner_link", + "(google.api.method_signature)": "parent,partner_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", + "body": "partner_link" + } + }, + { + "(google.api.method_signature)": "parent,partner_link" + } + ] + }, + "DeletePartnerLink": { + "requestType": "DeletePartnerLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SearchPartnerLinks": { + "requestType": "SearchPartnerLinksRequest", + "responseType": "SearchPartnerLinksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreatePartnerLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" + } + }, + "partnerLink": { + "type": "PartnerLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePartnerLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/PartnerLink" + } + } + } + }, + "SearchPartnerLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchPartnerLinksResponse": { + "fields": { + "partnerLinks": { + "rule": "repeated", + "type": "PartnerLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PartnerLink": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/PartnerLink", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}", + "(google.api.resource).plural": "partnerLinks", + "(google.api.resource).singular": "partnerLink" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "partnerLinkId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "owningAccount": { + "type": "ProductAccount", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "partnerAccount": { + "type": "ProductAccount", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UserList": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserList", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userLists/{user_list}", + "(google.api.resource).plural": "userLists", + "(google.api.resource).singular": "userList" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_membershipStatus": { + "oneof": [ + "membershipStatus" + ] + }, + "_integrationCode": { + "oneof": [ + "integrationCode" + ] + }, + "_closingReason": { + "oneof": [ + "closingReason" + ] + }, + "_accountAccessStatus": { + "oneof": [ + "accountAccessStatus" + ] + }, + "userListInfo": { + "oneof": [ + "ingestedUserListInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "id": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "readOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "membershipStatus": { + "type": "MembershipStatus", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "integrationCode": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "membershipDuration": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "closingReason": { + "type": "ClosingReason", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessReason": { + "type": "AccessReason", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "accountAccessStatus": { + "type": "AccessStatus", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sizeInfo": { + "type": "SizeInfo", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetNetworkInfo": { + "type": "TargetNetworkInfo", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ingestedUserListInfo": { + "type": "IngestedUserListInfo", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MembershipStatus": { + "values": { + "MEMBERSHIP_STATUS_UNSPECIFIED": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "ClosingReason": { + "values": { + "CLOSING_REASON_UNSPECIFIED": 0, + "UNUSED": 1 + } + }, + "AccessReason": { + "values": { + "ACCESS_REASON_UNSPECIFIED": 0, + "OWNED": 1, + "SHARED": 2, + "LICENSED": 3, + "SUBSCRIBED": 4, + "AFFILIATED": 5 + } + }, + "AccessStatus": { + "values": { + "ACCESS_STATUS_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, + "SizeInfo": { + "fields": { + "displayNetworkMembersCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "searchNetworkMembersCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "TargetNetworkInfo": { + "oneofs": { + "_eligibleForSearch": { + "oneof": [ + "eligibleForSearch" + ] + } + }, + "fields": { + "eligibleForDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eligibleForSearch": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "IngestedUserListInfo": { + "fields": { + "uploadKeyTypes": { + "rule": "repeated", + "type": "UploadKeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "contactIdInfo": { + "type": "ContactIdInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mobileIdInfo": { + "type": "MobileIdInfo", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userIdInfo": { + "type": "UserIdInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pairIdInfo": { + "type": "PairIdInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pseudonymousIdInfo": { + "type": "PseudonymousIdInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partnerAudienceInfo": { + "type": "PartnerAudienceInfo", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "UploadKeyType": { + "values": { + "UPLOAD_KEY_TYPE_UNSPECIFIED": 0, + "CONTACT_ID": 1, + "MOBILE_ID": 2, + "USER_ID": 3, + "PAIR_ID": 4, + "PSEUDONYMOUS_ID": 5 + } + } + } + }, + "ContactIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "matchRatePercentage": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "MobileIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + }, + "_keySpace": { + "oneof": [ + "keySpace" + ] + }, + "_appId": { + "oneof": [ + "appId" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "keySpace": { + "type": "KeySpace", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "appId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + }, + "nested": { + "KeySpace": { + "values": { + "KEY_SPACE_UNSPECIFIED": 0, + "IOS": 1, + "ANDROID": 2 + } + } + } + }, + "UserIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + } + }, + "PairIdInfo": { + "oneofs": { + "_publisherId": { + "oneof": [ + "publisherId" + ] + }, + "_publisherName": { + "oneof": [ + "publisherName" + ] + }, + "_cleanRoomIdentifier": { + "oneof": [ + "cleanRoomIdentifier" + ] + } + }, + "fields": { + "publisherId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "publisherName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "matchRatePercentage": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advertiserIdentifierCount": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cleanRoomIdentifier": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + } + }, + "PartnerAudienceInfo": { + "oneofs": { + "_partnerAudienceSource": { + "oneof": [ + "partnerAudienceSource" + ] + }, + "_commercePartner": { + "oneof": [ + "commercePartner" + ] + } + }, + "fields": { + "partnerAudienceSource": { + "type": "PartnerAudienceSource", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "commercePartner": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "PartnerAudienceSource": { + "values": { + "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": 0, + "COMMERCE_AUDIENCE": 1, + "LINEAR_TV_AUDIENCE": 2, + "AGENCY_PROVIDER_AUDIENCE": 3 + } + } + } + }, + "PseudonymousIdInfo": { + "oneofs": { + "_syncStatus": { + "oneof": [ + "syncStatus" + ] + }, + "_billableRecordCount": { + "oneof": [ + "billableRecordCount" + ] + } + }, + "fields": { + "syncStatus": { + "type": "SyncStatus", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "billableRecordCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + }, + "nested": { + "SyncStatus": { + "values": { + "SYNC_STATUS_UNSPECIFIED": 0, + "CREATED": 1, + "READY_FOR_USE": 2, + "FAILED": 3 + } + } + } + }, + "DataSourceType": { + "values": { + "DATA_SOURCE_TYPE_UNSPECIFIED": 0, + "DATA_SOURCE_TYPE_FIRST_PARTY": 1, + "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": 2, + "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": 3, + "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": 4 + } + }, + "UserListDirectLicense": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListDirectLicense", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}", + "(google.api.resource).plural": "userListDirectLicenses", + "(google.api.resource).singular": "userListDirectLicense" + }, + "oneofs": { + "_userListId": { + "oneof": [ + "userListId" + ] + }, + "_clientAccountType": { + "oneof": [ + "clientAccountType" + ] + }, + "_clientAccountId": { + "oneof": [ + "clientAccountId" + ] + }, + "_status": { + "oneof": [ + "status" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountType": { + "type": "UserListLicenseClientAccountType", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "clientAccountId": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "clientAccountDisplayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListLicenseClientAccountType": { + "values": { + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": 0, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": 1, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": 2, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": 3, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": 4 + } + }, + "UserListLicenseMetrics": { + "fields": { + "clickCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "impressionCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revenueUsdMicros": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startDate": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endDate": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListLicensePricing": { + "oneofs": { + "_costMicros": { + "oneof": [ + "costMicros" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_costType": { + "oneof": [ + "costType" + ] + }, + "_maxCostMicros": { + "oneof": [ + "maxCostMicros" + ] + } + }, + "fields": { + "pricingId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "costMicros": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pricingActive": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "buyerApprovalState": { + "type": "UserListPricingBuyerApprovalState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "costType": { + "type": "UserListPricingCostType", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "maxCostMicros": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "UserListPricingBuyerApprovalState": { + "values": { + "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "APPROVED": 2, + "REJECTED": 3 + } + }, + "UserListPricingCostType": { + "values": { + "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": 0, + "CPC": 1, + "CPM": 2, + "MEDIA_SHARE": 3 + } + } + } + }, + "UserListLicenseStatus": { + "values": { + "USER_LIST_LICENSE_STATUS_UNSPECIFIED": 0, + "USER_LIST_LICENSE_STATUS_ENABLED": 1, + "USER_LIST_LICENSE_STATUS_DISABLED": 2 + } + }, + "UserListDirectLicenseService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreateUserListDirectLicense": { + "requestType": "CreateUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "(google.api.http).body": "user_list_direct_license", + "(google.api.method_signature)": "parent,user_list_direct_license" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "body": "user_list_direct_license" + } + }, + { + "(google.api.method_signature)": "parent,user_list_direct_license" + } + ] + }, + "GetUserListDirectLicense": { + "requestType": "GetUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateUserListDirectLicense": { + "requestType": "UpdateUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "(google.api.http).body": "user_list_direct_license", + "(google.api.method_signature)": "user_list_direct_license,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "body": "user_list_direct_license" + } + }, + { + "(google.api.method_signature)": "user_list_direct_license,update_mask" + } + ] + }, + "ListUserListDirectLicenses": { + "requestType": "ListUserListDirectLicensesRequest", + "responseType": "ListUserListDirectLicensesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateUserListDirectLicenseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" + } + }, + "userListDirectLicense": { + "type": "UserListDirectLicense", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserListDirectLicenseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListDirectLicense" + } + } + } + }, + "UpdateUserListDirectLicenseRequest": { + "fields": { + "userListDirectLicense": { + "type": "UserListDirectLicense", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListDirectLicensesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListDirectLicensesResponse": { + "fields": { + "userListDirectLicenses": { + "rule": "repeated", + "type": "UserListDirectLicense", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserListGlobalLicense": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicense", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}", + "(google.api.resource).plural": "userListGlobalLicenses", + "(google.api.resource).singular": "userListGlobalLicense" + }, + "oneofs": { + "_userListId": { + "oneof": [ + "userListId" + ] + }, + "_licenseType": { + "oneof": [ + "licenseType" + ] + }, + "_status": { + "oneof": [ + "status" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "licenseType": { + "type": "UserListGlobalLicenseType", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListGlobalLicenseCustomerInfo": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}", + "(google.api.resource).plural": "userListGlobalLicenseCustomerInfos", + "(google.api.resource).singular": "userListGlobalLicenseCustomerInfo" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "licenseType": { + "type": "UserListGlobalLicenseType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountType": { + "type": "UserListLicenseClientAccountType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountId": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountDisplayName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListGlobalLicenseType": { + "values": { + "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": 0, + "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": 1, + "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": 2, + "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": 3 + } + }, + "UserListGlobalLicenseService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreateUserListGlobalLicense": { + "requestType": "CreateUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "(google.api.http).body": "user_list_global_license", + "(google.api.method_signature)": "parent,user_list_global_license" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "body": "user_list_global_license" + } + }, + { + "(google.api.method_signature)": "parent,user_list_global_license" + } + ] + }, + "UpdateUserListGlobalLicense": { + "requestType": "UpdateUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "(google.api.http).body": "user_list_global_license", + "(google.api.method_signature)": "user_list_global_license,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "body": "user_list_global_license" + } + }, + { + "(google.api.method_signature)": "user_list_global_license,update_mask" + } + ] + }, + "GetUserListGlobalLicense": { + "requestType": "GetUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserListGlobalLicenses": { + "requestType": "ListUserListGlobalLicensesRequest", + "responseType": "ListUserListGlobalLicensesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "requestType": "ListUserListGlobalLicenseCustomerInfosRequest", + "responseType": "ListUserListGlobalLicenseCustomerInfosResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateUserListGlobalLicenseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" + } + }, + "userListGlobalLicense": { + "type": "UserListGlobalLicense", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateUserListGlobalLicenseRequest": { + "fields": { + "userListGlobalLicense": { + "type": "UserListGlobalLicense", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetUserListGlobalLicenseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListGlobalLicense" + } + } + } + }, + "ListUserListGlobalLicensesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListGlobalLicensesResponse": { + "fields": { + "userListGlobalLicenses": { + "rule": "repeated", + "type": "UserListGlobalLicense", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListUserListGlobalLicenseCustomerInfosRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListGlobalLicenseCustomerInfosResponse": { + "fields": { + "userListGlobalLicenseCustomerInfos": { + "rule": "repeated", + "type": "UserListGlobalLicenseCustomerInfo", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserListService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "GetUserList": { + "requestType": "GetUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserLists": { + "requestType": "ListUserListsRequest", + "responseType": "ListUserListsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateUserList": { + "requestType": "CreateUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "(google.api.http).body": "user_list", + "(google.api.method_signature)": "parent,user_list" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "body": "user_list" + } + }, + { + "(google.api.method_signature)": "parent,user_list" + } + ] + }, + "UpdateUserList": { + "requestType": "UpdateUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.http).body": "user_list", + "(google.api.method_signature)": "user_list,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", + "body": "user_list" + } + }, + { + "(google.api.method_signature)": "user_list,update_mask" + } + ] + }, + "DeleteUserList": { + "requestType": "DeleteUserListRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetUserListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" + } + } + } + }, + "ListUserListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" + } + }, + "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" + } + } + } + }, + "ListUserListsResponse": { + "fields": { + "userLists": { + "rule": "repeated", + "type": "UserList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateUserListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" + } + }, + "userList": { + "type": "UserList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateUserListRequest": { + "fields": { + "userList": { + "type": "UserList", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteUserListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + } + } + }, + "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 + } + }, + "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 + } + } + }, + "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 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js new file mode 100644 index 00000000000..8ba5e2618ea --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js @@ -0,0 +1,100 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js new file mode 100644 index 00000000000..ee3433aa233 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js @@ -0,0 +1,96 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js new file mode 100644 index 00000000000..c658a3a353b --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js new file mode 100644 index 00000000000..2eb4495b57e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js new file mode 100644 index 00000000000..ca47194e9a5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, baseline, userListId) { + // [START datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_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 account that owns the user list. + * Format: `accountTypes/{account_type}/accounts/{account}` + */ + // const parent = 'abc123' + /** + * Required. Baseline for the insights requested. + */ + // const baseline = {} + /** + * Required. The user list ID for which insights are requested. + */ + // const userListId = 'abc123' + + // Imports the Datamanager library + const {MarketingDataInsightsServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new MarketingDataInsightsServiceClient(); + + async function callRetrieveInsights() { + // Construct request + const request = { + parent, + baseline, + userListId, + }; + + // Run request + const response = await datamanagerClient.retrieveInsights(request); + console.log(response); + } + + callRetrieveInsights(); + // [END datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js new file mode 100644 index 00000000000..86c8cb19ea7 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, partnerLink) { + // [START datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_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 partner links. + * Format: accountTypes/{account_type}/accounts/{account} + */ + // const parent = 'abc123' + /** + * Required. The partner link to create. + */ + // const partnerLink = {} + + // Imports the Datamanager library + const {PartnerLinkServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new PartnerLinkServiceClient(); + + async function callCreatePartnerLink() { + // Construct request + const request = { + parent, + partnerLink, + }; + + // Run request + const response = await datamanagerClient.createPartnerLink(request); + console.log(response); + } + + callCreatePartnerLink(); + // [END datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js new file mode 100644 index 00000000000..10d70ee0f16 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_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 partner link to delete. + * Format: + * accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} + */ + // const name = 'abc123' + + // Imports the Datamanager library + const {PartnerLinkServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new PartnerLinkServiceClient(); + + async function callDeletePartnerLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datamanagerClient.deletePartnerLink(request); + console.log(response); + } + + callDeletePartnerLink(); + // [END datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js new file mode 100644 index 00000000000..8ef0b9dbaa5 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js @@ -0,0 +1,99 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_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. Account to search for partner links. If no `filter` is specified, + * all partner links where this account is either the `owning_account` or + * `partner_account` are returned. + * Format: `accountTypes/{account_type}/accounts/{account}` + */ + // const parent = 'abc123' + /** + * The maximum number of partner links to return. The service may return + * fewer than this value. + * If unspecified, at most 10 partner links will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `SearchPartnerLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `SearchPartnerLinks` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter string (//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `partner_link_id = + * 123456789`). + * Supported operations: + * - `AND` + * - `=` + * - `!=` + * Supported fields: + * - `partner_link_id` + * - `owning_account.account_type` + * - `owning_account.account_id` + * - `partner_account.account_type` + * - `partner_account.account_id` + * Example: + * `owning_account.account_type = "GOOGLE_ADS" OR partner_account.account_id = + * 987654321` + */ + // const filter = 'abc123' + + // Imports the Datamanager library + const {PartnerLinkServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new PartnerLinkServiceClient(); + + async function callSearchPartnerLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datamanagerClient.searchPartnerLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchPartnerLinks(); + // [END datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json new file mode 100644 index 00000000000..08c06e3ea9f --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json @@ -0,0 +1,1063 @@ +{ + "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" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_async", + "title": "IngestionService retrieveInsights Sample", + "origin": "API_DEFINITION", + "description": " Retrieves marketing data insights for a given user list. This feature is only available to data partners. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "marketing_data_insights_service.retrieve_insights.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetrieveInsights", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "baseline", + "type": ".google.ads.datamanager.v1.Baseline" + }, + { + "name": "user_list_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.RetrieveInsightsResponse", + "client": { + "shortName": "MarketingDataInsightsServiceClient", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsServiceClient" + }, + "method": { + "shortName": "RetrieveInsights", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", + "service": { + "shortName": "MarketingDataInsightsService", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_async", + "title": "IngestionService createPartnerLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.create_partner_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "partner_link", + "type": ".google.ads.datamanager.v1.PartnerLink" + } + ], + "resultType": ".google.ads.datamanager.v1.PartnerLink", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "CreatePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_async", + "title": "IngestionService deletePartnerLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.delete_partner_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "DeletePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_async", + "title": "IngestionService searchPartnerLinks Sample", + "origin": "API_DEFINITION", + "description": " Searches for all partner links to and from a given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.search_partner_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchPartnerLinks", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", + "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" + } + ], + "resultType": ".google.ads.datamanager.v1.SearchPartnerLinksResponse", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "SearchPartnerLinks", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_async", + "title": "IngestionService createUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Creates a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.create_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list_direct_license", + "type": ".google.ads.datamanager.v1.UserListDirectLicense" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "CreateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_async", + "title": "IngestionService getUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.get_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "GetUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_async", + "title": "IngestionService updateUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Updates a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.update_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "user_list_direct_license", + "type": ".google.ads.datamanager.v1.UserListDirectLicense" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "UpdateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_async", + "title": "IngestionService listUserListDirectLicenses Sample", + "origin": "API_DEFINITION", + "description": " Lists all user list direct licenses owned by the parent account. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.list_user_list_direct_licenses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListDirectLicenses", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListDirectLicensesResponse", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListDirectLicenses", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_async", + "title": "IngestionService createUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Creates a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.create_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list_global_license", + "type": ".google.ads.datamanager.v1.UserListGlobalLicense" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "CreateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_async", + "title": "IngestionService updateUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Updates a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.update_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "user_list_global_license", + "type": ".google.ads.datamanager.v1.UserListGlobalLicense" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "UpdateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_async", + "title": "IngestionService getUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.get_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "GetUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_async", + "title": "IngestionService listUserListGlobalLicenses Sample", + "origin": "API_DEFINITION", + "description": " Lists all user list global licenses owned by the parent account. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.list_user_list_global_licenses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListGlobalLicenses", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListGlobalLicenses", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_async", + "title": "IngestionService listUserListGlobalLicenseCustomerInfos Sample", + "origin": "API_DEFINITION", + "description": " Lists all customer info for a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.list_user_list_global_license_customer_infos.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 94, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListGlobalLicenseCustomerInfos", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListGlobalLicenseCustomerInfos", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_GetUserList_async", + "title": "IngestionService getUserList Sample", + "origin": "API_DEFINITION", + "description": " Gets a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.get_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserList", + "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "GetUserList", + "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_ListUserLists_async", + "title": "IngestionService listUserLists Sample", + "origin": "API_DEFINITION", + "description": " Lists UserLists. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.list_user_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserLists", + "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", + "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" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListsResponse", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "ListUserLists", + "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_CreateUserList_async", + "title": "IngestionService createUserList Sample", + "origin": "API_DEFINITION", + "description": " Creates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.create_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list", + "type": ".google.ads.datamanager.v1.UserList" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "CreateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_UpdateUserList_async", + "title": "IngestionService updateUserList Sample", + "origin": "API_DEFINITION", + "description": " Updates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.update_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", + "async": true, + "parameters": [ + { + "name": "user_list", + "type": ".google.ads.datamanager.v1.UserList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "UpdateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_DeleteUserList_async", + "title": "IngestionService deleteUserList Sample", + "origin": "API_DEFINITION", + "description": " Deletes a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.delete_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserList", + "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "DeleteUserList", + "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js new file mode 100644 index 00000000000..4b513d1787a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, userListDirectLicense) { + // [START datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_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 account that owns the user list being licensed. Should be in + * the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + */ + // const parent = 'abc123' + /** + * Required. The user list direct license to create. + */ + // const userListDirectLicense = {} + + // Imports the Datamanager library + const {UserListDirectLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListDirectLicenseServiceClient(); + + async function callCreateUserListDirectLicense() { + // Construct request + const request = { + parent, + userListDirectLicense, + }; + + // Run request + const response = await datamanagerClient.createUserListDirectLicense(request); + console.log(response); + } + + callCreateUserListDirectLicense(); + // [END datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js new file mode 100644 index 00000000000..0e980721de4 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_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 user list direct license. + */ + // const name = 'abc123' + + // Imports the Datamanager library + const {UserListDirectLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListDirectLicenseServiceClient(); + + async function callGetUserListDirectLicense() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datamanagerClient.getUserListDirectLicense(request); + console.log(response); + } + + callGetUserListDirectLicense(); + // [END datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js new file mode 100644 index 00000000000..53966c05ebd --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js @@ -0,0 +1,98 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_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 account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + */ + // const parent = 'abc123' + /** + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * **Supported Operations:** + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * **Unsupported Fields:** + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + */ + // const filter = 'abc123' + /** + * Optional. The maximum number of licenses to return per page. The service + * may return fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Datamanager library + const {UserListDirectLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListDirectLicenseServiceClient(); + + async function callListUserListDirectLicenses() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datamanagerClient.listUserListDirectLicensesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserListDirectLicenses(); + // [END datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js new file mode 100644 index 00000000000..52d487d06c7 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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(userListDirectLicense) { + // [START datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_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 licenses' `name` field is used to identify the license to + * update. + */ + // const userListDirectLicense = {} + /** + * Optional. The list of fields to update. The special character `*` is not + * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + */ + // const updateMask = {} + + // Imports the Datamanager library + const {UserListDirectLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListDirectLicenseServiceClient(); + + async function callUpdateUserListDirectLicense() { + // Construct request + const request = { + userListDirectLicense, + }; + + // Run request + const response = await datamanagerClient.updateUserListDirectLicense(request); + console.log(response); + } + + callUpdateUserListDirectLicense(); + // [END datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js new file mode 100644 index 00000000000..7948a9ae927 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, userListGlobalLicense) { + // [START datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_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 account that owns the user list being licensed. Should be in + * the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + */ + // const parent = 'abc123' + /** + * Required. The user list global license to create. + */ + // const userListGlobalLicense = {} + + // Imports the Datamanager library + const {UserListGlobalLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListGlobalLicenseServiceClient(); + + async function callCreateUserListGlobalLicense() { + // Construct request + const request = { + parent, + userListGlobalLicense, + }; + + // Run request + const response = await datamanagerClient.createUserListGlobalLicense(request); + console.log(response); + } + + callCreateUserListGlobalLicense(); + // [END datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js new file mode 100644 index 00000000000..a8005ccbf8a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_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 user list global license. + */ + // const name = 'abc123' + + // Imports the Datamanager library + const {UserListGlobalLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListGlobalLicenseServiceClient(); + + async function callGetUserListGlobalLicense() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datamanagerClient.getUserListGlobalLicense(request); + console.log(response); + } + + callGetUserListGlobalLicense(); + // [END datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js new file mode 100644 index 00000000000..b39cfce6a77 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js @@ -0,0 +1,102 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_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 global license whose customer info are being queried. Should + * be in the format + * `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. + * To list all global license customer info under an account, replace the user + * list global license id with a '-' (for example, + * `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) + */ + // const parent = 'abc123' + /** + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * **Supported Operations:** + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * **Unsupported Fields:** + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + */ + // const filter = 'abc123' + /** + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Datamanager library + const {UserListGlobalLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListGlobalLicenseServiceClient(); + + async function callListUserListGlobalLicenseCustomerInfos() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datamanagerClient.listUserListGlobalLicenseCustomerInfosAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserListGlobalLicenseCustomerInfos(); + // [END datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js new file mode 100644 index 00000000000..183e342fedd --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js @@ -0,0 +1,98 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_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 account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + */ + // const parent = 'abc123' + /** + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * **Supported Operations:** + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * **Unsupported Fields:** + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + */ + // const filter = 'abc123' + /** + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Datamanager library + const {UserListGlobalLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListGlobalLicenseServiceClient(); + + async function callListUserListGlobalLicenses() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datamanagerClient.listUserListGlobalLicensesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserListGlobalLicenses(); + // [END datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js new file mode 100644 index 00000000000..f20d08a3ebc --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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(userListGlobalLicense) { + // [START datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_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 licenses' `name` field is used to identify the license to + * update. + */ + // const userListGlobalLicense = {} + /** + * Optional. The list of fields to update. The special character `*` is not + * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + */ + // const updateMask = {} + + // Imports the Datamanager library + const {UserListGlobalLicenseServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListGlobalLicenseServiceClient(); + + async function callUpdateUserListGlobalLicense() { + // Construct request + const request = { + userListGlobalLicense, + }; + + // Run request + const response = await datamanagerClient.updateUserListGlobalLicense(request); + console.log(response); + } + + callUpdateUserListGlobalLicense(); + // [END datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js new file mode 100644 index 00000000000..2be25ee4ba0 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, userList) { + // [START datamanager_v1_generated_UserListService_CreateUserList_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 account where this user list will be created. + * Format: accountTypes/{account_type}/accounts/{account} + */ + // const parent = 'abc123' + /** + * Required. The user list to create. + */ + // const userList = {} + /** + * Optional. If true, the request is validated but not executed. + */ + // const validateOnly = true + + // Imports the Datamanager library + const {UserListServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListServiceClient(); + + async function callCreateUserList() { + // Construct request + const request = { + parent, + userList, + }; + + // Run request + const response = await datamanagerClient.createUserList(request); + console.log(response); + } + + callCreateUserList(); + // [END datamanager_v1_generated_UserListService_CreateUserList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js new file mode 100644 index 00000000000..4b7516e670a --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListService_DeleteUserList_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 user list to delete. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + */ + // const name = 'abc123' + /** + * Optional. If true, the request is validated but not executed. + */ + // const validateOnly = true + + // Imports the Datamanager library + const {UserListServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListServiceClient(); + + async function callDeleteUserList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datamanagerClient.deleteUserList(request); + console.log(response); + } + + callDeleteUserList(); + // [END datamanager_v1_generated_UserListService_DeleteUserList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js new file mode 100644 index 00000000000..12fc66f37d0 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListService_GetUserList_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 UserList to retrieve. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + */ + // const name = 'abc123' + + // Imports the Datamanager library + const {UserListServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListServiceClient(); + + async function callGetUserList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datamanagerClient.getUserList(request); + console.log(response); + } + + callGetUserList(); + // [END datamanager_v1_generated_UserListService_GetUserList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js new file mode 100644 index 00000000000..bf1639eae24 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 datamanager_v1_generated_UserListService_ListUserLists_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 account which owns this collection of user lists. + * Format: accountTypes/{account_type}/accounts/{account} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of user lists to return. The service may + * return fewer than this value. If unspecified, at most 50 user lists 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 `ListUserLists` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLists` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter string (//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `display_name = "list + * 1"`). + * Supported operations: + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * - `:` (has) + * Supported fields: + * - `id` + * - `display_name` + * - `description` + * - `membership_status` + * - `integration_code` + * - `access_reason` + * - `ingested_user_list_info.upload_key_types` + */ + // const filter = 'abc123' + + // Imports the Datamanager library + const {UserListServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListServiceClient(); + + async function callListUserLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datamanagerClient.listUserListsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserLists(); + // [END datamanager_v1_generated_UserListService_ListUserLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js new file mode 100644 index 00000000000..8b4c2e01336 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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(userList) { + // [START datamanager_v1_generated_UserListService_UpdateUserList_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 user list to update. + * The user list's `name` field is used to identify the user list to update. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + */ + // const userList = {} + /** + * Optional. The list of fields to update. + */ + // const updateMask = {} + /** + * Optional. If true, the request is validated but not executed. + */ + // const validateOnly = true + + // Imports the Datamanager library + const {UserListServiceClient} = require('@google-ads/datamanager').v1; + + // Instantiates a client + const datamanagerClient = new UserListServiceClient(); + + async function callUpdateUserList() { + // Construct request + const request = { + userList, + }; + + // Run request + const response = await datamanagerClient.updateUserList(request); + console.log(response); + } + + callUpdateUserList(); + // [END datamanager_v1_generated_UserListService_UpdateUserList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-ads-datamanager/src/index.ts b/owl-bot-staging/google-ads-datamanager/src/index.ts new file mode 100644 index 00000000000..f2dc3b71128 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/index.ts @@ -0,0 +1,37 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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; +const MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; +type MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; +const PartnerLinkServiceClient = v1.PartnerLinkServiceClient; +type PartnerLinkServiceClient = v1.PartnerLinkServiceClient; +const UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; +type UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; +const UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; +type UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; +const UserListServiceClient = v1.UserListServiceClient; +type UserListServiceClient = v1.UserListServiceClient; + +export {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; +export default {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json b/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..97528f86755 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json @@ -0,0 +1,333 @@ +{ + "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" + ] + } + } + } + } + }, + "MarketingDataInsightsService": { + "clients": { + "grpc": { + "libraryClient": "MarketingDataInsightsServiceClient", + "rpcs": { + "RetrieveInsights": { + "methods": [ + "retrieveInsights" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MarketingDataInsightsServiceClient", + "rpcs": { + "RetrieveInsights": { + "methods": [ + "retrieveInsights" + ] + } + } + } + } + }, + "PartnerLinkService": { + "clients": { + "grpc": { + "libraryClient": "PartnerLinkServiceClient", + "rpcs": { + "CreatePartnerLink": { + "methods": [ + "createPartnerLink" + ] + }, + "DeletePartnerLink": { + "methods": [ + "deletePartnerLink" + ] + }, + "SearchPartnerLinks": { + "methods": [ + "searchPartnerLinks", + "searchPartnerLinksStream", + "searchPartnerLinksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PartnerLinkServiceClient", + "rpcs": { + "CreatePartnerLink": { + "methods": [ + "createPartnerLink" + ] + }, + "DeletePartnerLink": { + "methods": [ + "deletePartnerLink" + ] + }, + "SearchPartnerLinks": { + "methods": [ + "searchPartnerLinks", + "searchPartnerLinksStream", + "searchPartnerLinksAsync" + ] + } + } + } + } + }, + "UserListDirectLicenseService": { + "clients": { + "grpc": { + "libraryClient": "UserListDirectLicenseServiceClient", + "rpcs": { + "CreateUserListDirectLicense": { + "methods": [ + "createUserListDirectLicense" + ] + }, + "GetUserListDirectLicense": { + "methods": [ + "getUserListDirectLicense" + ] + }, + "UpdateUserListDirectLicense": { + "methods": [ + "updateUserListDirectLicense" + ] + }, + "ListUserListDirectLicenses": { + "methods": [ + "listUserListDirectLicenses", + "listUserListDirectLicensesStream", + "listUserListDirectLicensesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListDirectLicenseServiceClient", + "rpcs": { + "CreateUserListDirectLicense": { + "methods": [ + "createUserListDirectLicense" + ] + }, + "GetUserListDirectLicense": { + "methods": [ + "getUserListDirectLicense" + ] + }, + "UpdateUserListDirectLicense": { + "methods": [ + "updateUserListDirectLicense" + ] + }, + "ListUserListDirectLicenses": { + "methods": [ + "listUserListDirectLicenses", + "listUserListDirectLicensesStream", + "listUserListDirectLicensesAsync" + ] + } + } + } + } + }, + "UserListGlobalLicenseService": { + "clients": { + "grpc": { + "libraryClient": "UserListGlobalLicenseServiceClient", + "rpcs": { + "CreateUserListGlobalLicense": { + "methods": [ + "createUserListGlobalLicense" + ] + }, + "UpdateUserListGlobalLicense": { + "methods": [ + "updateUserListGlobalLicense" + ] + }, + "GetUserListGlobalLicense": { + "methods": [ + "getUserListGlobalLicense" + ] + }, + "ListUserListGlobalLicenses": { + "methods": [ + "listUserListGlobalLicenses", + "listUserListGlobalLicensesStream", + "listUserListGlobalLicensesAsync" + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "methods": [ + "listUserListGlobalLicenseCustomerInfos", + "listUserListGlobalLicenseCustomerInfosStream", + "listUserListGlobalLicenseCustomerInfosAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListGlobalLicenseServiceClient", + "rpcs": { + "CreateUserListGlobalLicense": { + "methods": [ + "createUserListGlobalLicense" + ] + }, + "UpdateUserListGlobalLicense": { + "methods": [ + "updateUserListGlobalLicense" + ] + }, + "GetUserListGlobalLicense": { + "methods": [ + "getUserListGlobalLicense" + ] + }, + "ListUserListGlobalLicenses": { + "methods": [ + "listUserListGlobalLicenses", + "listUserListGlobalLicensesStream", + "listUserListGlobalLicensesAsync" + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "methods": [ + "listUserListGlobalLicenseCustomerInfos", + "listUserListGlobalLicenseCustomerInfosStream", + "listUserListGlobalLicenseCustomerInfosAsync" + ] + } + } + } + } + }, + "UserListService": { + "clients": { + "grpc": { + "libraryClient": "UserListServiceClient", + "rpcs": { + "GetUserList": { + "methods": [ + "getUserList" + ] + }, + "CreateUserList": { + "methods": [ + "createUserList" + ] + }, + "UpdateUserList": { + "methods": [ + "updateUserList" + ] + }, + "DeleteUserList": { + "methods": [ + "deleteUserList" + ] + }, + "ListUserLists": { + "methods": [ + "listUserLists", + "listUserListsStream", + "listUserListsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListServiceClient", + "rpcs": { + "GetUserList": { + "methods": [ + "getUserList" + ] + }, + "CreateUserList": { + "methods": [ + "createUserList" + ] + }, + "UpdateUserList": { + "methods": [ + "updateUserList" + ] + }, + "DeleteUserList": { + "methods": [ + "deleteUserList" + ] + }, + "ListUserLists": { + "methods": [ + "listUserLists", + "listUserListsStream", + "listUserListsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/index.ts b/owl-bot-staging/google-ads-datamanager/src/v1/index.ts new file mode 100644 index 00000000000..b7d57ada5bc --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/index.ts @@ -0,0 +1,24 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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'; +export {MarketingDataInsightsServiceClient} from './marketing_data_insights_service_client'; +export {PartnerLinkServiceClient} from './partner_link_service_client'; +export {UserListDirectLicenseServiceClient} from './user_list_direct_license_service_client'; +export {UserListGlobalLicenseServiceClient} from './user_list_global_license_service_client'; +export {UserListServiceClient} from './user_list_service_client'; diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts new file mode 100644 index 00000000000..30ad66231cf --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts @@ -0,0 +1,1048 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // 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; + }); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json new file mode 100644 index 00000000000..d198e4f1285 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts new file mode 100644 index 00000000000..e2953da9aa4 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts @@ -0,0 +1,737 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/marketing_data_insights_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './marketing_data_insights_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to return insights on marketing data. + * + * This feature is only available to data partners. + * @class + * @memberof v1 + */ +export class MarketingDataInsightsServiceClient { + 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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + marketingDataInsightsServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MarketingDataInsightsServiceClient. + * + * @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 MarketingDataInsightsServiceClient({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 MarketingDataInsightsServiceClient; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.MarketingDataInsightsService', 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.marketingDataInsightsServiceStub) { + return this.marketingDataInsightsServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.MarketingDataInsightsService. + this.marketingDataInsightsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.MarketingDataInsightsService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.MarketingDataInsightsService, + 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 marketingDataInsightsServiceStubMethods = + ['retrieveInsights']; + for (const methodName of marketingDataInsightsServiceStubMethods) { + const callPromise = this.marketingDataInsightsServiceStub.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.marketingDataInsightsServiceStub; + } + + /** + * 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 -- + // ------------------- +/** + * Retrieves marketing data insights for a given user list. + * + * This feature is only available to data partners. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent account that owns the user list. + * Format: `accountTypes/{account_type}/accounts/{account}` + * @param {google.ads.datamanager.v1.Baseline} request.baseline + * Required. Baseline for the insights requested. + * @param {string} request.userListId + * Required. The user list ID for which insights are requested. + * @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.RetrieveInsightsResponse|RetrieveInsightsResponse}. + * 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/marketing_data_insights_service.retrieve_insights.js + * region_tag:datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_async + */ + retrieveInsights( + request?: protos.google.ads.datamanager.v1.IRetrieveInsightsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|undefined, {}|undefined + ]>; + retrieveInsights( + request: protos.google.ads.datamanager.v1.IRetrieveInsightsRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|null|undefined, + {}|null|undefined>): void; + retrieveInsights( + request: protos.google.ads.datamanager.v1.IRetrieveInsightsRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|null|undefined, + {}|null|undefined>): void; + retrieveInsights( + request?: protos.google.ads.datamanager.v1.IRetrieveInsightsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|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('retrieveInsights request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('retrieveInsights response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.retrieveInsights(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IRetrieveInsightsResponse, + protos.google.ads.datamanager.v1.IRetrieveInsightsRequest|undefined, + {}|undefined + ]) => { + this._log.info('retrieveInsights 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; + }); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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.marketingDataInsightsServiceStub && !this._terminated) { + return this.marketingDataInsightsServiceStub.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/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json new file mode 100644 index 00000000000..2c6feed7fbd --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.MarketingDataInsightsService": { + "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": { + "RetrieveInsights": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts new file mode 100644 index 00000000000..091a6ea2985 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts @@ -0,0 +1,1191 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/partner_link_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './partner_link_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing partner links. + * @class + * @memberof v1 + */ +export class PartnerLinkServiceClient { + 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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + partnerLinkServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PartnerLinkServiceClient. + * + * @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 PartnerLinkServiceClient({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 PartnerLinkServiceClient; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + accountPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}' + ), + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // 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 = { + searchPartnerLinks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'partnerLinks') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.PartnerLinkService', 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.partnerLinkServiceStub) { + return this.partnerLinkServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.PartnerLinkService. + this.partnerLinkServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.PartnerLinkService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.PartnerLinkService, + 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 partnerLinkServiceStubMethods = + ['createPartnerLink', 'deletePartnerLink', 'searchPartnerLinks']; + for (const methodName of partnerLinkServiceStubMethods) { + const callPromise = this.partnerLinkServiceStub.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.partnerLinkServiceStub; + } + + /** + * 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 -- + // ------------------- +/** + * Creates a partner link for the given account. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of partner links. + * Format: accountTypes/{account_type}/accounts/{account} + * @param {google.ads.datamanager.v1.PartnerLink} request.partnerLink + * Required. The partner link 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.datamanager.v1.PartnerLink|PartnerLink}. + * 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/partner_link_service.create_partner_link.js + * region_tag:datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_async + */ + createPartnerLink( + request?: protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|undefined, {}|undefined + ]>; + createPartnerLink( + request: protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|null|undefined, + {}|null|undefined>): void; + createPartnerLink( + request: protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|null|undefined, + {}|null|undefined>): void; + createPartnerLink( + request?: protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|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('createPartnerLink request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createPartnerLink response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createPartnerLink(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IPartnerLink, + protos.google.ads.datamanager.v1.ICreatePartnerLinkRequest|undefined, + {}|undefined + ]) => { + this._log.info('createPartnerLink 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; + }); + } +/** + * Deletes a partner link for the given account. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partner link to delete. + * Format: + * accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} + * @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.protobuf.Empty|Empty}. + * 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/partner_link_service.delete_partner_link.js + * region_tag:datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_async + */ + deletePartnerLink( + request?: protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|undefined, {}|undefined + ]>; + deletePartnerLink( + request: protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|null|undefined, + {}|null|undefined>): void; + deletePartnerLink( + request: protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|null|undefined, + {}|null|undefined>): void; + deletePartnerLink( + request?: protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|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('deletePartnerLink request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deletePartnerLink response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deletePartnerLink(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeletePartnerLinkRequest|undefined, + {}|undefined + ]) => { + this._log.info('deletePartnerLink 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; + }); + } + + /** + * Searches for all partner links to and from a given account. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Account to search for partner links. If no `filter` is specified, + * all partner links where this account is either the `owning_account` or + * `partner_account` are returned. + * + * Format: `accountTypes/{account_type}/accounts/{account}` + * @param {number} request.pageSize + * The maximum number of partner links to return. The service may return + * fewer than this value. + * If unspecified, at most 10 partner links will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `SearchPartnerLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `SearchPartnerLinks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `partner_link_id = + * 123456789`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * + * Supported fields: + * + * - `partner_link_id` + * - `owning_account.account_type` + * - `owning_account.account_id` + * - `partner_account.account_type` + * - `partner_account.account_id` + * + * Example: + * `owning_account.account_type = "GOOGLE_ADS" OR partner_account.account_id = + * 987654321` + * @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.datamanager.v1.PartnerLink|PartnerLink}. + * 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 `searchPartnerLinksAsync()` + * 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. + */ + searchPartnerLinks( + request?: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IPartnerLink[], + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest|null, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse + ]>; + searchPartnerLinks( + request: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse|null|undefined, + protos.google.ads.datamanager.v1.IPartnerLink>): void; + searchPartnerLinks( + request: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse|null|undefined, + protos.google.ads.datamanager.v1.IPartnerLink>): void; + searchPartnerLinks( + request?: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse|null|undefined, + protos.google.ads.datamanager.v1.IPartnerLink>, + callback?: PaginationCallback< + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse|null|undefined, + protos.google.ads.datamanager.v1.IPartnerLink>): + Promise<[ + protos.google.ads.datamanager.v1.IPartnerLink[], + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest|null, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse + ]>|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.datamanager.v1.ISearchPartnerLinksRequest, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse|null|undefined, + protos.google.ads.datamanager.v1.IPartnerLink>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('searchPartnerLinks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('searchPartnerLinks request %j', request); + return this.innerApiCalls + .searchPartnerLinks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.datamanager.v1.IPartnerLink[], + protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest|null, + protos.google.ads.datamanager.v1.ISearchPartnerLinksResponse + ]) => { + this._log.info('searchPartnerLinks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `searchPartnerLinks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Account to search for partner links. If no `filter` is specified, + * all partner links where this account is either the `owning_account` or + * `partner_account` are returned. + * + * Format: `accountTypes/{account_type}/accounts/{account}` + * @param {number} request.pageSize + * The maximum number of partner links to return. The service may return + * fewer than this value. + * If unspecified, at most 10 partner links will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `SearchPartnerLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `SearchPartnerLinks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `partner_link_id = + * 123456789`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * + * Supported fields: + * + * - `partner_link_id` + * - `owning_account.account_type` + * - `owning_account.account_id` + * - `partner_account.account_type` + * - `partner_account.account_id` + * + * Example: + * `owning_account.account_type = "GOOGLE_ADS" OR partner_account.account_id = + * 987654321` + * @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.datamanager.v1.PartnerLink|PartnerLink} 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 `searchPartnerLinksAsync()` + * 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. + */ + searchPartnerLinksStream( + request?: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + 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['searchPartnerLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('searchPartnerLinks stream %j', request); + return this.descriptors.page.searchPartnerLinks.createStream( + this.innerApiCalls.searchPartnerLinks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `searchPartnerLinks`, 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. Account to search for partner links. If no `filter` is specified, + * all partner links where this account is either the `owning_account` or + * `partner_account` are returned. + * + * Format: `accountTypes/{account_type}/accounts/{account}` + * @param {number} request.pageSize + * The maximum number of partner links to return. The service may return + * fewer than this value. + * If unspecified, at most 10 partner links will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `SearchPartnerLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `SearchPartnerLinks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `partner_link_id = + * 123456789`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * + * Supported fields: + * + * - `partner_link_id` + * - `owning_account.account_type` + * - `owning_account.account_id` + * - `partner_account.account_type` + * - `partner_account.account_id` + * + * Example: + * `owning_account.account_type = "GOOGLE_ADS" OR partner_account.account_id = + * 987654321` + * @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.datamanager.v1.PartnerLink|PartnerLink}. 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/partner_link_service.search_partner_links.js + * region_tag:datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_async + */ + searchPartnerLinksAsync( + request?: protos.google.ads.datamanager.v1.ISearchPartnerLinksRequest, + 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['searchPartnerLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('searchPartnerLinks iterate %j', request); + return this.descriptors.page.searchPartnerLinks.asyncIterate( + this.innerApiCalls['searchPartnerLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account_type + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(accountType:string,account:string) { + return this.pathTemplates.accountPathTemplate.render({ + account_type: accountType, + account: account, + }); + } + + /** + * Parse the account_type from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account_type; + } + + /** + * Parse the account from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account; + } + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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.partnerLinkServiceStub && !this._terminated) { + return this.partnerLinkServiceStub.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/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json new file mode 100644 index 00000000000..38cbd9a3e8b --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json @@ -0,0 +1,38 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.PartnerLinkService": { + "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": { + "CreatePartnerLink": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePartnerLink": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SearchPartnerLinks": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts new file mode 100644 index 00000000000..d9382a2d597 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts @@ -0,0 +1,1251 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_direct_license_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './user_list_direct_license_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing user list direct licenses. Delete is not a supported + * operation for UserListDirectLicenses. Callers should update the + * license status to DISABLED to instead to deactivate a license. + * + * This feature is only available to data partners. + * @class + * @memberof v1 + */ +export class UserListDirectLicenseServiceClient { + 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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + userListDirectLicenseServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of UserListDirectLicenseServiceClient. + * + * @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 UserListDirectLicenseServiceClient({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 UserListDirectLicenseServiceClient; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + accountPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}' + ), + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // 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 = { + listUserListDirectLicenses: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userListDirectLicenses') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.UserListDirectLicenseService', 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.userListDirectLicenseServiceStub) { + return this.userListDirectLicenseServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.UserListDirectLicenseService. + this.userListDirectLicenseServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.UserListDirectLicenseService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.UserListDirectLicenseService, + 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 userListDirectLicenseServiceStubMethods = + ['createUserListDirectLicense', 'getUserListDirectLicense', 'updateUserListDirectLicense', 'listUserListDirectLicenses']; + for (const methodName of userListDirectLicenseServiceStubMethods) { + const callPromise = this.userListDirectLicenseServiceStub.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.userListDirectLicenseServiceStub; + } + + /** + * 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 -- + // ------------------- +/** + * Creates a user list direct license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account that owns the user list being licensed. Should be in + * the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {google.ads.datamanager.v1.UserListDirectLicense} request.userListDirectLicense + * Required. The user list direct license 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.datamanager.v1.UserListDirectLicense|UserListDirectLicense}. + * 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/user_list_direct_license_service.create_user_list_direct_license.js + * region_tag:datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_async + */ + createUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|undefined, {}|undefined + ]>; + createUserListDirectLicense( + request: protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + createUserListDirectLicense( + request: protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + createUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|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('createUserListDirectLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createUserListDirectLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createUserListDirectLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('createUserListDirectLicense 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 user list direct license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the user list direct license. + * @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.UserListDirectLicense|UserListDirectLicense}. + * 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/user_list_direct_license_service.get_user_list_direct_license.js + * region_tag:datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_async + */ + getUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|undefined, {}|undefined + ]>; + getUserListDirectLicense( + request: protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + getUserListDirectLicense( + request: protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + getUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|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('getUserListDirectLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getUserListDirectLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getUserListDirectLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IGetUserListDirectLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('getUserListDirectLicense 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; + }); + } +/** + * Updates a user list direct license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.datamanager.v1.UserListDirectLicense} request.userListDirectLicense + * Required. The licenses' `name` field is used to identify the license to + * update. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. The special character `*` is not + * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + * @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.UserListDirectLicense|UserListDirectLicense}. + * 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/user_list_direct_license_service.update_user_list_direct_license.js + * region_tag:datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_async + */ + updateUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|undefined, {}|undefined + ]>; + updateUserListDirectLicense( + request: protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + updateUserListDirectLicense( + request: protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): void; + updateUserListDirectLicense( + request?: protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|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({ + 'user_list_direct_license.name': request.userListDirectLicense!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateUserListDirectLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateUserListDirectLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateUserListDirectLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListDirectLicense, + protos.google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateUserListDirectLicense 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; + }); + } + + /** + * Lists all user list direct licenses owned by the parent account. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return per page. The service + * may return fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListDirectLicense|UserListDirectLicense}. + * 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 `listUserListDirectLicensesAsync()` + * 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. + */ + listUserListDirectLicenses( + request?: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense[], + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse + ]>; + listUserListDirectLicenses( + request: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListDirectLicense>): void; + listUserListDirectLicenses( + request: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListDirectLicense>): void; + listUserListDirectLicenses( + request?: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListDirectLicense>, + callback?: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListDirectLicense>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListDirectLicense[], + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse + ]>|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.datamanager.v1.IListUserListDirectLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListDirectLicense>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listUserListDirectLicenses values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listUserListDirectLicenses request %j', request); + return this.innerApiCalls + .listUserListDirectLicenses(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.datamanager.v1.IUserListDirectLicense[], + protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListDirectLicensesResponse + ]) => { + this._log.info('listUserListDirectLicenses values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listUserListDirectLicenses`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return per page. The service + * may return fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListDirectLicense|UserListDirectLicense} 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 `listUserListDirectLicensesAsync()` + * 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. + */ + listUserListDirectLicensesStream( + request?: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + 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['listUserListDirectLicenses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListDirectLicenses stream %j', request); + return this.descriptors.page.listUserListDirectLicenses.createStream( + this.innerApiCalls.listUserListDirectLicenses as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserListDirectLicenses`, 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 account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return per page. The service + * may return fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListDirectLicense|UserListDirectLicense}. 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/user_list_direct_license_service.list_user_list_direct_licenses.js + * region_tag:datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_async + */ + listUserListDirectLicensesAsync( + request?: protos.google.ads.datamanager.v1.IListUserListDirectLicensesRequest, + 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['listUserListDirectLicenses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListDirectLicenses iterate %j', request); + return this.descriptors.page.listUserListDirectLicenses.asyncIterate( + this.innerApiCalls['listUserListDirectLicenses'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account_type + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(accountType:string,account:string) { + return this.pathTemplates.accountPathTemplate.render({ + account_type: accountType, + account: account, + }); + } + + /** + * Parse the account_type from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account_type; + } + + /** + * Parse the account from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account; + } + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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.userListDirectLicenseServiceStub && !this._terminated) { + return this.userListDirectLicenseServiceStub.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/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json new file mode 100644 index 00000000000..19705c3315d --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.UserListDirectLicenseService": { + "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": { + "CreateUserListDirectLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserListDirectLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserListDirectLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserListDirectLicenses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts new file mode 100644 index 00000000000..eb92cd4aea4 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts @@ -0,0 +1,1548 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_global_license_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './user_list_global_license_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing user list global licenses. Delete is not a supported + * operation for UserListGlobalLicenses. Callers should update the + * license status to DISABLED to instead to deactivate a license. + * + * This feature is only available to data partners. + * @class + * @memberof v1 + */ +export class UserListGlobalLicenseServiceClient { + 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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + userListGlobalLicenseServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of UserListGlobalLicenseServiceClient. + * + * @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 UserListGlobalLicenseServiceClient({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 UserListGlobalLicenseServiceClient; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + accountPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}' + ), + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // 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 = { + listUserListGlobalLicenses: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userListGlobalLicenses'), + listUserListGlobalLicenseCustomerInfos: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userListGlobalLicenseCustomerInfos') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.UserListGlobalLicenseService', 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.userListGlobalLicenseServiceStub) { + return this.userListGlobalLicenseServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.UserListGlobalLicenseService. + this.userListGlobalLicenseServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.UserListGlobalLicenseService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.UserListGlobalLicenseService, + 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 userListGlobalLicenseServiceStubMethods = + ['createUserListGlobalLicense', 'updateUserListGlobalLicense', 'getUserListGlobalLicense', 'listUserListGlobalLicenses', 'listUserListGlobalLicenseCustomerInfos']; + for (const methodName of userListGlobalLicenseServiceStubMethods) { + const callPromise = this.userListGlobalLicenseServiceStub.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.userListGlobalLicenseServiceStub; + } + + /** + * 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 -- + // ------------------- +/** + * Creates a user list global license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account that owns the user list being licensed. Should be in + * the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {google.ads.datamanager.v1.UserListGlobalLicense} request.userListGlobalLicense + * Required. The user list global license 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.datamanager.v1.UserListGlobalLicense|UserListGlobalLicense}. + * 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/user_list_global_license_service.create_user_list_global_license.js + * region_tag:datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_async + */ + createUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|undefined, {}|undefined + ]>; + createUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + createUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + createUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|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('createUserListGlobalLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createUserListGlobalLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createUserListGlobalLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('createUserListGlobalLicense 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; + }); + } +/** + * Updates a user list global license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.datamanager.v1.UserListGlobalLicense} request.userListGlobalLicense + * Required. The licenses' `name` field is used to identify the license to + * update. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. The special character `*` is not + * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. + * @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.UserListGlobalLicense|UserListGlobalLicense}. + * 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/user_list_global_license_service.update_user_list_global_license.js + * region_tag:datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_async + */ + updateUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|undefined, {}|undefined + ]>; + updateUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + updateUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + updateUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|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({ + 'user_list_global_license.name': request.userListGlobalLicense!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateUserListGlobalLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateUserListGlobalLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateUserListGlobalLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateUserListGlobalLicense 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 user list global license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the user list global license. + * @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.UserListGlobalLicense|UserListGlobalLicense}. + * 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/user_list_global_license_service.get_user_list_global_license.js + * region_tag:datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_async + */ + getUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|undefined, {}|undefined + ]>; + getUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + getUserListGlobalLicense( + request: protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): void; + getUserListGlobalLicense( + request?: protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|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('getUserListGlobalLicense request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getUserListGlobalLicense response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getUserListGlobalLicense(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserListGlobalLicense, + protos.google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest|undefined, + {}|undefined + ]) => { + this._log.info('getUserListGlobalLicense 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; + }); + } + + /** + * Lists all user list global licenses owned by the parent account. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicense|UserListGlobalLicense}. + * 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 `listUserListGlobalLicensesAsync()` + * 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. + */ + listUserListGlobalLicenses( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse + ]>; + listUserListGlobalLicenses( + request: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicense>): void; + listUserListGlobalLicenses( + request: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicense>): void; + listUserListGlobalLicenses( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicense>, + callback?: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicense>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicense[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse + ]>|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.datamanager.v1.IListUserListGlobalLicensesRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicense>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listUserListGlobalLicenses values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listUserListGlobalLicenses request %j', request); + return this.innerApiCalls + .listUserListGlobalLicenses(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.datamanager.v1.IUserListGlobalLicense[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicensesResponse + ]) => { + this._log.info('listUserListGlobalLicenses values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listUserListGlobalLicenses`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicense|UserListGlobalLicense} 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 `listUserListGlobalLicensesAsync()` + * 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. + */ + listUserListGlobalLicensesStream( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + 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['listUserListGlobalLicenses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListGlobalLicenses stream %j', request); + return this.descriptors.page.listUserListGlobalLicenses.createStream( + this.innerApiCalls.listUserListGlobalLicenses as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserListGlobalLicenses`, 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 account whose licenses are being queried. Should be in the + * format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicense|UserListGlobalLicense}. 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/user_list_global_license_service.list_user_list_global_licenses.js + * region_tag:datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_async + */ + listUserListGlobalLicensesAsync( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, + 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['listUserListGlobalLicenses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListGlobalLicenses iterate %j', request); + return this.descriptors.page.listUserListGlobalLicenses.asyncIterate( + this.innerApiCalls['listUserListGlobalLicenses'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all customer info for a user list global license. + * + * This feature is only available to data partners. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The global license whose customer info are being queried. Should + * be in the format + * `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. + * To list all global license customer info under an account, replace the user + * list global license id with a '-' (for example, + * `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo|UserListGlobalLicenseCustomerInfo}. + * 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 `listUserListGlobalLicenseCustomerInfosAsync()` + * 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. + */ + listUserListGlobalLicenseCustomerInfos( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse + ]>; + listUserListGlobalLicenseCustomerInfos( + request: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo>): void; + listUserListGlobalLicenseCustomerInfos( + request: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo>): void; + listUserListGlobalLicenseCustomerInfos( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo>, + callback?: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo>): + Promise<[ + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse + ]>|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.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listUserListGlobalLicenseCustomerInfos values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listUserListGlobalLicenseCustomerInfos request %j', request); + return this.innerApiCalls + .listUserListGlobalLicenseCustomerInfos(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[], + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest|null, + protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse + ]) => { + this._log.info('listUserListGlobalLicenseCustomerInfos values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listUserListGlobalLicenseCustomerInfos`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The global license whose customer info are being queried. Should + * be in the format + * `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. + * To list all global license customer info under an account, replace the user + * list global license id with a '-' (for example, + * `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo|UserListGlobalLicenseCustomerInfo} 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 `listUserListGlobalLicenseCustomerInfosAsync()` + * 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. + */ + listUserListGlobalLicenseCustomerInfosStream( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + 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['listUserListGlobalLicenseCustomerInfos']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListGlobalLicenseCustomerInfos stream %j', request); + return this.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream( + this.innerApiCalls.listUserListGlobalLicenseCustomerInfos as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserListGlobalLicenseCustomerInfos`, 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 global license whose customer info are being queried. Should + * be in the format + * `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. + * To list all global license customer info under an account, replace the user + * list global license id with a '-' (for example, + * `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) + * @param {string} [request.filter] + * Optional. Filters to apply to the list request. All fields need to be on + * the left hand side of each condition (for example: user_list_id = 123). + * + * **Supported Operations:** + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * + * **Unsupported Fields:** + * + * - `name` (use get method instead) + * - `historical_pricings` and all its subfields + * - `pricing.start_time` + * - `pricing.end_time` + * @param {number} [request.pageSize] + * Optional. The maximum number of licenses to return. The service may return + * fewer than this value. If unspecified, at most 50 licenses 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 + * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent + * page. + * + * When paginating, all other parameters provided to + * `ListUserListDirectLicense` 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.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo|UserListGlobalLicenseCustomerInfo}. 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/user_list_global_license_service.list_user_list_global_license_customer_infos.js + * region_tag:datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_async + */ + listUserListGlobalLicenseCustomerInfosAsync( + request?: protos.google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, + 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['listUserListGlobalLicenseCustomerInfos']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserListGlobalLicenseCustomerInfos iterate %j', request); + return this.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate( + this.innerApiCalls['listUserListGlobalLicenseCustomerInfos'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account_type + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(accountType:string,account:string) { + return this.pathTemplates.accountPathTemplate.render({ + account_type: accountType, + account: account, + }); + } + + /** + * Parse the account_type from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account_type; + } + + /** + * Parse the account from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account; + } + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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.userListGlobalLicenseServiceStub && !this._terminated) { + return this.userListGlobalLicenseServiceStub.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/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json new file mode 100644 index 00000000000..c71805278ff --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.UserListGlobalLicenseService": { + "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": { + "CreateUserListGlobalLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserListGlobalLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserListGlobalLicense": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserListGlobalLicenses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserListGlobalLicenseCustomerInfos": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts new file mode 100644 index 00000000000..7760dc4a860 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts @@ -0,0 +1,1419 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/user_list_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './user_list_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing UserList resources. + * @class + * @memberof v1 + */ +export class UserListServiceClient { + 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}; + pathTemplates: {[name: string]: gax.PathTemplate}; + userListServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of UserListServiceClient. + * + * @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 UserListServiceClient({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 UserListServiceClient; + 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); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + accountPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}' + ), + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + + // 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 = { + listUserLists: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userLists') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ads.datamanager.v1.UserListService', 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.userListServiceStub) { + return this.userListServiceStub; + } + + // Put together the "service stub" for + // google.ads.datamanager.v1.UserListService. + this.userListServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.ads.datamanager.v1.UserListService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ads.datamanager.v1.UserListService, + 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 userListServiceStubMethods = + ['getUserList', 'listUserLists', 'createUserList', 'updateUserList', 'deleteUserList']; + for (const methodName of userListServiceStubMethods) { + const callPromise = this.userListServiceStub.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.userListServiceStub; + } + + /** + * 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 -- + // ------------------- +/** + * Gets a UserList. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the UserList to retrieve. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_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.ads.datamanager.v1.UserList|UserList}. + * 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/user_list_service.get_user_list.js + * region_tag:datamanager_v1_generated_UserListService_GetUserList_async + */ + getUserList( + request?: protos.google.ads.datamanager.v1.IGetUserListRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|undefined, {}|undefined + ]>; + getUserList( + request: protos.google.ads.datamanager.v1.IGetUserListRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|null|undefined, + {}|null|undefined>): void; + getUserList( + request: protos.google.ads.datamanager.v1.IGetUserListRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|null|undefined, + {}|null|undefined>): void; + getUserList( + request?: protos.google.ads.datamanager.v1.IGetUserListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|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('getUserList request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getUserList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getUserList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IGetUserListRequest|undefined, + {}|undefined + ]) => { + this._log.info('getUserList 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 UserList. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent account where this user list will be created. + * Format: accountTypes/{account_type}/accounts/{account} + * @param {google.ads.datamanager.v1.UserList} request.userList + * Required. The user list to create. + * @param {boolean} [request.validateOnly] + * Optional. If true, the request is validated but not executed. + * @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.UserList|UserList}. + * 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/user_list_service.create_user_list.js + * region_tag:datamanager_v1_generated_UserListService_CreateUserList_async + */ + createUserList( + request?: protos.google.ads.datamanager.v1.ICreateUserListRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|undefined, {}|undefined + ]>; + createUserList( + request: protos.google.ads.datamanager.v1.ICreateUserListRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|null|undefined, + {}|null|undefined>): void; + createUserList( + request: protos.google.ads.datamanager.v1.ICreateUserListRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|null|undefined, + {}|null|undefined>): void; + createUserList( + request?: protos.google.ads.datamanager.v1.ICreateUserListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|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('createUserList request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createUserList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createUserList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.ICreateUserListRequest|undefined, + {}|undefined + ]) => { + this._log.info('createUserList 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; + }); + } +/** + * Updates a UserList. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {google.ads.datamanager.v1.UserList} request.userList + * Required. The user list to update. + * + * The user list's `name` field is used to identify the user list to update. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. If true, the request is validated but not executed. + * @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.UserList|UserList}. + * 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/user_list_service.update_user_list.js + * region_tag:datamanager_v1_generated_UserListService_UpdateUserList_async + */ + updateUserList( + request?: protos.google.ads.datamanager.v1.IUpdateUserListRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|undefined, {}|undefined + ]>; + updateUserList( + request: protos.google.ads.datamanager.v1.IUpdateUserListRequest, + options: CallOptions, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|null|undefined, + {}|null|undefined>): void; + updateUserList( + request: protos.google.ads.datamanager.v1.IUpdateUserListRequest, + callback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|null|undefined, + {}|null|undefined>): void; + updateUserList( + request?: protos.google.ads.datamanager.v1.IUpdateUserListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|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({ + 'user_list.name': request.userList!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateUserList request %j', request); + const wrappedCallback: Callback< + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateUserList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateUserList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.ads.datamanager.v1.IUserList, + protos.google.ads.datamanager.v1.IUpdateUserListRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateUserList 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; + }); + } +/** + * Deletes a UserList. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the user list to delete. + * Format: + * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} + * @param {boolean} [request.validateOnly] + * Optional. If true, the request is validated but not executed. + * @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.protobuf.Empty|Empty}. + * 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/user_list_service.delete_user_list.js + * region_tag:datamanager_v1_generated_UserListService_DeleteUserList_async + */ + deleteUserList( + request?: protos.google.ads.datamanager.v1.IDeleteUserListRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|undefined, {}|undefined + ]>; + deleteUserList( + request: protos.google.ads.datamanager.v1.IDeleteUserListRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|null|undefined, + {}|null|undefined>): void; + deleteUserList( + request: protos.google.ads.datamanager.v1.IDeleteUserListRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|null|undefined, + {}|null|undefined>): void; + deleteUserList( + request?: protos.google.ads.datamanager.v1.IDeleteUserListRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|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('deleteUserList request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteUserList response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteUserList(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.ads.datamanager.v1.IDeleteUserListRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteUserList 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; + }); + } + + /** + * Lists UserLists. + * + * Authorization Headers: + * + * This method supports the following optional headers to define how the API + * authorizes access for the request: + * + * * `login-account`: (Optional) The resource name of the account where the + * Google Account of the credentials is a user. If not set, defaults to the + * account of the request. Format: + * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` + * * `linked-account`: (Optional) The resource name of the account with an + * established product link to the `login-account`. Format: + * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent account which owns this collection of user lists. + * Format: accountTypes/{account_type}/accounts/{account} + * @param {number} [request.pageSize] + * Optional. The maximum number of user lists to return. The service may + * return fewer than this value. If unspecified, at most 50 user lists 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 `ListUserLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListUserLists` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `display_name = "list + * 1"`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * - `:` (has) + * + * Supported fields: + * + * - `id` + * - `display_name` + * - `description` + * - `membership_status` + * - `integration_code` + * - `access_reason` + * - `ingested_user_list_info.upload_key_types` + * @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.datamanager.v1.UserList|UserList}. + * 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 `listUserListsAsync()` + * 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. + */ + listUserLists( + request?: protos.google.ads.datamanager.v1.IListUserListsRequest, + options?: CallOptions): + Promise<[ + protos.google.ads.datamanager.v1.IUserList[], + protos.google.ads.datamanager.v1.IListUserListsRequest|null, + protos.google.ads.datamanager.v1.IListUserListsResponse + ]>; + listUserLists( + request: protos.google.ads.datamanager.v1.IListUserListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListsRequest, + protos.google.ads.datamanager.v1.IListUserListsResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserList>): void; + listUserLists( + request: protos.google.ads.datamanager.v1.IListUserListsRequest, + callback: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListsRequest, + protos.google.ads.datamanager.v1.IListUserListsResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserList>): void; + listUserLists( + request?: protos.google.ads.datamanager.v1.IListUserListsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListsRequest, + protos.google.ads.datamanager.v1.IListUserListsResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserList>, + callback?: PaginationCallback< + protos.google.ads.datamanager.v1.IListUserListsRequest, + protos.google.ads.datamanager.v1.IListUserListsResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserList>): + Promise<[ + protos.google.ads.datamanager.v1.IUserList[], + protos.google.ads.datamanager.v1.IListUserListsRequest|null, + protos.google.ads.datamanager.v1.IListUserListsResponse + ]>|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.datamanager.v1.IListUserListsRequest, + protos.google.ads.datamanager.v1.IListUserListsResponse|null|undefined, + protos.google.ads.datamanager.v1.IUserList>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listUserLists values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listUserLists request %j', request); + return this.innerApiCalls + .listUserLists(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.ads.datamanager.v1.IUserList[], + protos.google.ads.datamanager.v1.IListUserListsRequest|null, + protos.google.ads.datamanager.v1.IListUserListsResponse + ]) => { + this._log.info('listUserLists values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listUserLists`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent account which owns this collection of user lists. + * Format: accountTypes/{account_type}/accounts/{account} + * @param {number} [request.pageSize] + * Optional. The maximum number of user lists to return. The service may + * return fewer than this value. If unspecified, at most 50 user lists 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 `ListUserLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListUserLists` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `display_name = "list + * 1"`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * - `:` (has) + * + * Supported fields: + * + * - `id` + * - `display_name` + * - `description` + * - `membership_status` + * - `integration_code` + * - `access_reason` + * - `ingested_user_list_info.upload_key_types` + * @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.datamanager.v1.UserList|UserList} 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 `listUserListsAsync()` + * 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. + */ + listUserListsStream( + request?: protos.google.ads.datamanager.v1.IListUserListsRequest, + 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['listUserLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserLists stream %j', request); + return this.descriptors.page.listUserLists.createStream( + this.innerApiCalls.listUserLists as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserLists`, 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 account which owns this collection of user lists. + * Format: accountTypes/{account_type}/accounts/{account} + * @param {number} [request.pageSize] + * Optional. The maximum number of user lists to return. The service may + * return fewer than this value. If unspecified, at most 50 user lists 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 `ListUserLists` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListUserLists` must + * match the call that provided the page token. + * @param {string} [request.filter] + * Optional. A [filter string](//google.aip.dev/160). All fields need to be on + * the left hand side of each condition (for example: `display_name = "list + * 1"`). + * + * Supported operations: + * + * - `AND` + * - `=` + * - `!=` + * - `>` + * - `>=` + * - `<` + * - `<=` + * - `:` (has) + * + * Supported fields: + * + * - `id` + * - `display_name` + * - `description` + * - `membership_status` + * - `integration_code` + * - `access_reason` + * - `ingested_user_list_info.upload_key_types` + * @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.datamanager.v1.UserList|UserList}. 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/user_list_service.list_user_lists.js + * region_tag:datamanager_v1_generated_UserListService_ListUserLists_async + */ + listUserListsAsync( + request?: protos.google.ads.datamanager.v1.IListUserListsRequest, + 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['listUserLists']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listUserLists iterate %j', request); + return this.descriptors.page.listUserLists.asyncIterate( + this.innerApiCalls['listUserLists'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account_type + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(accountType:string,account:string) { + return this.pathTemplates.accountPathTemplate.render({ + account_type: accountType, + account: account, + }); + } + + /** + * Parse the account_type from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account_type; + } + + /** + * Parse the account from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account; + } + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } + + /** + * 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.userListServiceStub && !this._terminated) { + return this.userListServiceStub.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/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json new file mode 100644 index 00000000000..c8abe723125 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.ads.datamanager.v1.UserListService": { + "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": { + "GetUserList": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserLists": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateUserList": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserList": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUserList": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json new file mode 100644 index 00000000000..ec5cc61b87e --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json @@ -0,0 +1,34 @@ +[ + "../../protos/google/ads/datamanager/v1/age_range.proto", + "../../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/gender.proto", + "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", + "../../protos/google/ads/datamanager/v1/item_parameter.proto", + "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", + "../../protos/google/ads/datamanager/v1/user_properties.proto" +] diff --git a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..da1c9a355b4 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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(); + const marketingDataInsightsServiceClient = new datamanager.MarketingDataInsightsServiceClient(); + const partnerLinkServiceClient = new datamanager.PartnerLinkServiceClient(); + const userListDirectLicenseServiceClient = new datamanager.UserListDirectLicenseServiceClient(); + const userListGlobalLicenseServiceClient = new datamanager.UserListGlobalLicenseServiceClient(); + const userListServiceClient = new datamanager.UserListServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..2e2810220ae --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient} from '@google-ads/datamanager'; + +// check that the client class type name can be used +function doStuffWithIngestionServiceClient(client: IngestionServiceClient) { + client.close(); +} +function doStuffWithMarketingDataInsightsServiceClient(client: MarketingDataInsightsServiceClient) { + client.close(); +} +function doStuffWithPartnerLinkServiceClient(client: PartnerLinkServiceClient) { + client.close(); +} +function doStuffWithUserListDirectLicenseServiceClient(client: UserListDirectLicenseServiceClient) { + client.close(); +} +function doStuffWithUserListGlobalLicenseServiceClient(client: UserListGlobalLicenseServiceClient) { + client.close(); +} +function doStuffWithUserListServiceClient(client: UserListServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const ingestionServiceClient = new IngestionServiceClient(); + doStuffWithIngestionServiceClient(ingestionServiceClient); + // check that the client instance can be created + const marketingDataInsightsServiceClient = new MarketingDataInsightsServiceClient(); + doStuffWithMarketingDataInsightsServiceClient(marketingDataInsightsServiceClient); + // check that the client instance can be created + const partnerLinkServiceClient = new PartnerLinkServiceClient(); + doStuffWithPartnerLinkServiceClient(partnerLinkServiceClient); + // check that the client instance can be created + const userListDirectLicenseServiceClient = new UserListDirectLicenseServiceClient(); + doStuffWithUserListDirectLicenseServiceClient(userListDirectLicenseServiceClient); + // check that the client instance can be created + const userListGlobalLicenseServiceClient = new UserListGlobalLicenseServiceClient(); + doStuffWithUserListGlobalLicenseServiceClient(userListGlobalLicenseServiceClient); + // check that the client instance can be created + const userListServiceClient = new UserListServiceClient(); + doStuffWithUserListServiceClient(userListServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-ads-datamanager/system-test/install.ts b/owl-bot-staging/google-ads-datamanager/system-test/install.ts new file mode 100644 index 00000000000..394f3362d20 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts new file mode 100644 index 00000000000..ab31bea65b7 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts @@ -0,0 +1,755 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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); + }); + }); + + describe('Path templates', () => { + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts new file mode 100644 index 00000000000..eabc01fa865 --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts @@ -0,0 +1,563 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 marketingdatainsightsserviceModule 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.MarketingDataInsightsServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient(); + 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 = marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient.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 = marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({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 marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient(); + 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 marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({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 marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.marketingDataInsightsServiceStub, undefined); + await client.initialize(); + assert(client.marketingDataInsightsServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.marketingDataInsightsServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.marketingDataInsightsServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + 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 marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + 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('retrieveInsights', () => { + it('invokes retrieveInsights without error', async () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.RetrieveInsightsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsResponse() + ); + client.innerApiCalls.retrieveInsights = stubSimpleCall(expectedResponse); + const [response] = await client.retrieveInsights(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveInsights without error using callback', async () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.RetrieveInsightsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsResponse() + ); + client.innerApiCalls.retrieveInsights = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retrieveInsights( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IRetrieveInsightsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveInsights with error', async () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.RetrieveInsightsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.retrieveInsights = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retrieveInsights(request), expectedError); + const actualRequest = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retrieveInsights as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retrieveInsights with closed client', async () => { + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.RetrieveInsightsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.RetrieveInsightsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.retrieveInsights(request), expectedError); + }); + }); + + describe('Path templates', () => { + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new marketingdatainsightsserviceModule.v1.MarketingDataInsightsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts new file mode 100644 index 00000000000..d279f6e51bd --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts @@ -0,0 +1,1001 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 partnerlinkserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +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); +} + +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.PartnerLinkServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient(); + 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 = partnerlinkserviceModule.v1.PartnerLinkServiceClient.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 = partnerlinkserviceModule.v1.PartnerLinkServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({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 partnerlinkserviceModule.v1.PartnerLinkServiceClient(); + 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 partnerlinkserviceModule.v1.PartnerLinkServiceClient({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 partnerlinkserviceModule.v1.PartnerLinkServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = partnerlinkserviceModule.v1.PartnerLinkServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.partnerLinkServiceStub, undefined); + await client.initialize(); + assert(client.partnerLinkServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.partnerLinkServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.partnerLinkServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + 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 partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + 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('createPartnerLink', () => { + it('invokes createPartnerLink without error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreatePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreatePartnerLinkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.PartnerLink() + ); + client.innerApiCalls.createPartnerLink = stubSimpleCall(expectedResponse); + const [response] = await client.createPartnerLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartnerLink without error using callback', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreatePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreatePartnerLinkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.PartnerLink() + ); + client.innerApiCalls.createPartnerLink = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPartnerLink( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IPartnerLink|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartnerLink with error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreatePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreatePartnerLinkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPartnerLink = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createPartnerLink(request), expectedError); + const actualRequest = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartnerLink with closed client', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreatePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreatePartnerLinkRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createPartnerLink(request), expectedError); + }); + }); + + describe('deletePartnerLink', () => { + it('invokes deletePartnerLink without error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeletePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeletePartnerLinkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePartnerLink = stubSimpleCall(expectedResponse); + const [response] = await client.deletePartnerLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartnerLink without error using callback', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeletePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeletePartnerLinkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePartnerLink = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePartnerLink( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartnerLink with error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeletePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeletePartnerLinkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePartnerLink = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deletePartnerLink(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartnerLink as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartnerLink with closed client', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeletePartnerLinkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeletePartnerLinkRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deletePartnerLink(request), expectedError); + }); + }); + + describe('searchPartnerLinks', () => { + it('invokes searchPartnerLinks without error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + ]; + client.innerApiCalls.searchPartnerLinks = stubSimpleCall(expectedResponse); + const [response] = await client.searchPartnerLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchPartnerLinks without error using callback', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + ]; + client.innerApiCalls.searchPartnerLinks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchPartnerLinks( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IPartnerLink[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchPartnerLinks with error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchPartnerLinks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.searchPartnerLinks(request), expectedError); + const actualRequest = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchPartnerLinks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchPartnerLinksStream without error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + ]; + client.descriptors.page.searchPartnerLinks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.searchPartnerLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.PartnerLink[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.PartnerLink) => { + 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.searchPartnerLinks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchPartnerLinks, request)); + assert( + (client.descriptors.page.searchPartnerLinks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchPartnerLinksStream with error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.searchPartnerLinks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.searchPartnerLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.PartnerLink[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.PartnerLink) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.searchPartnerLinks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchPartnerLinks, request)); + assert( + (client.descriptors.page.searchPartnerLinks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchPartnerLinks without error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + generateSampleMessage(new protos.google.ads.datamanager.v1.PartnerLink()), + ]; + client.descriptors.page.searchPartnerLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.datamanager.v1.IPartnerLink[] = []; + const iterable = client.searchPartnerLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.searchPartnerLinks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchPartnerLinks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchPartnerLinks with error', async () => { + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.SearchPartnerLinksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.SearchPartnerLinksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.searchPartnerLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchPartnerLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.datamanager.v1.IPartnerLink[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.searchPartnerLinks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchPartnerLinks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('account', async () => { + const fakePath = "/rendered/path/account"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.accountPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.accountPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath("accountTypeValue", "accountValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromAccountName', () => { + const result = client.matchAccountTypeFromAccountName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new partnerlinkserviceModule.v1.PartnerLinkServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts new file mode 100644 index 00000000000..7a0268de80f --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts @@ -0,0 +1,1113 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 userlistdirectlicenseserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +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); +} + +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.UserListDirectLicenseServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient(); + 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 = userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient.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 = userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({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 userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient(); + 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 userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({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 userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListDirectLicenseServiceStub, undefined); + await client.initialize(); + assert(client.userListDirectLicenseServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.userListDirectLicenseServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListDirectLicenseServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + 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 userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + 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('createUserListDirectLicense', () => { + it('invokes createUserListDirectLicense without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.createUserListDirectLicense = stubSimpleCall(expectedResponse); + const [response] = await client.createUserListDirectLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListDirectLicense without error using callback', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.createUserListDirectLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserListDirectLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListDirectLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListDirectLicense with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserListDirectLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserListDirectLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListDirectLicense with closed client', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createUserListDirectLicense(request), expectedError); + }); + }); + + describe('getUserListDirectLicense', () => { + it('invokes getUserListDirectLicense without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListDirectLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.getUserListDirectLicense = stubSimpleCall(expectedResponse); + const [response] = await client.getUserListDirectLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListDirectLicense without error using callback', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListDirectLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.getUserListDirectLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserListDirectLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListDirectLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListDirectLicense with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListDirectLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserListDirectLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserListDirectLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListDirectLicense with closed client', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListDirectLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListDirectLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getUserListDirectLicense(request), expectedError); + }); + }); + + describe('updateUserListDirectLicense', () => { + it('invokes updateUserListDirectLicense without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest() + ); + request.userListDirectLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest', ['userListDirectLicense', 'name']); + request.userListDirectLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_direct_license.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.updateUserListDirectLicense = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserListDirectLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListDirectLicense without error using callback', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest() + ); + request.userListDirectLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest', ['userListDirectLicense', 'name']); + request.userListDirectLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_direct_license.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListDirectLicense() + ); + client.innerApiCalls.updateUserListDirectLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserListDirectLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListDirectLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListDirectLicense with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest() + ); + request.userListDirectLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest', ['userListDirectLicense', 'name']); + request.userListDirectLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_direct_license.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserListDirectLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserListDirectLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListDirectLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListDirectLicense with closed client', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest() + ); + request.userListDirectLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest', ['userListDirectLicense', 'name']); + request.userListDirectLicense.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateUserListDirectLicense(request), expectedError); + }); + }); + + describe('listUserListDirectLicenses', () => { + it('invokes listUserListDirectLicenses without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + ]; + client.innerApiCalls.listUserListDirectLicenses = stubSimpleCall(expectedResponse); + const [response] = await client.listUserListDirectLicenses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListDirectLicenses without error using callback', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + ]; + client.innerApiCalls.listUserListDirectLicenses = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserListDirectLicenses( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListDirectLicense[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListDirectLicenses with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserListDirectLicenses = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserListDirectLicenses(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListDirectLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListDirectLicensesStream without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + ]; + client.descriptors.page.listUserListDirectLicenses.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserListDirectLicensesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListDirectLicense[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListDirectLicense) => { + 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.listUserListDirectLicenses.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListDirectLicenses, request)); + assert( + (client.descriptors.page.listUserListDirectLicenses.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserListDirectLicensesStream with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListDirectLicenses.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserListDirectLicensesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListDirectLicense[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListDirectLicense) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserListDirectLicenses.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListDirectLicenses, request)); + assert( + (client.descriptors.page.listUserListDirectLicenses.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListDirectLicenses without error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListDirectLicense()), + ]; + client.descriptors.page.listUserListDirectLicenses.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.datamanager.v1.IUserListDirectLicense[] = []; + const iterable = client.listUserListDirectLicensesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserListDirectLicenses.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListDirectLicenses.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListDirectLicenses with error', async () => { + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListDirectLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListDirectLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListDirectLicenses.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserListDirectLicensesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.datamanager.v1.IUserListDirectLicense[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserListDirectLicenses.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListDirectLicenses.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('account', async () => { + const fakePath = "/rendered/path/account"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.accountPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.accountPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath("accountTypeValue", "accountValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromAccountName', () => { + const result = client.matchAccountTypeFromAccountName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new userlistdirectlicenseserviceModule.v1.UserListDirectLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts new file mode 100644 index 00000000000..22cc88ec5fb --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts @@ -0,0 +1,1358 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 userlistgloballicenseserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +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); +} + +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.UserListGlobalLicenseServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient(); + 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 = userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient.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 = userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({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 userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient(); + 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 userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({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 userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListGlobalLicenseServiceStub, undefined); + await client.initialize(); + assert(client.userListGlobalLicenseServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.userListGlobalLicenseServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListGlobalLicenseServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + 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 userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + 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('createUserListGlobalLicense', () => { + it('invokes createUserListGlobalLicense without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.createUserListGlobalLicense = stubSimpleCall(expectedResponse); + const [response] = await client.createUserListGlobalLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListGlobalLicense without error using callback', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.createUserListGlobalLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserListGlobalLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListGlobalLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListGlobalLicense with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserListGlobalLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserListGlobalLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserListGlobalLicense with closed client', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createUserListGlobalLicense(request), expectedError); + }); + }); + + describe('updateUserListGlobalLicense', () => { + it('invokes updateUserListGlobalLicense without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest() + ); + request.userListGlobalLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest', ['userListGlobalLicense', 'name']); + request.userListGlobalLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_global_license.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.updateUserListGlobalLicense = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserListGlobalLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListGlobalLicense without error using callback', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest() + ); + request.userListGlobalLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest', ['userListGlobalLicense', 'name']); + request.userListGlobalLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_global_license.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.updateUserListGlobalLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserListGlobalLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListGlobalLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListGlobalLicense with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest() + ); + request.userListGlobalLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest', ['userListGlobalLicense', 'name']); + request.userListGlobalLicense.name = defaultValue1; + const expectedHeaderRequestParams = `user_list_global_license.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserListGlobalLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserListGlobalLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserListGlobalLicense with closed client', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest() + ); + request.userListGlobalLicense ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest', ['userListGlobalLicense', 'name']); + request.userListGlobalLicense.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateUserListGlobalLicense(request), expectedError); + }); + }); + + describe('getUserListGlobalLicense', () => { + it('invokes getUserListGlobalLicense without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.getUserListGlobalLicense = stubSimpleCall(expectedResponse); + const [response] = await client.getUserListGlobalLicense(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListGlobalLicense without error using callback', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserListGlobalLicense() + ); + client.innerApiCalls.getUserListGlobalLicense = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserListGlobalLicense( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListGlobalLicense|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListGlobalLicense with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserListGlobalLicense = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserListGlobalLicense(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserListGlobalLicense as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserListGlobalLicense with closed client', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getUserListGlobalLicense(request), expectedError); + }); + }); + + describe('listUserListGlobalLicenses', () => { + it('invokes listUserListGlobalLicenses without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + ]; + client.innerApiCalls.listUserListGlobalLicenses = stubSimpleCall(expectedResponse); + const [response] = await client.listUserListGlobalLicenses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicenses without error using callback', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + ]; + client.innerApiCalls.listUserListGlobalLicenses = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserListGlobalLicenses( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListGlobalLicense[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicenses with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserListGlobalLicenses = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserListGlobalLicenses(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenses as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicensesStream without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + ]; + client.descriptors.page.listUserListGlobalLicenses.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserListGlobalLicensesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListGlobalLicense[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListGlobalLicense) => { + 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.listUserListGlobalLicenses.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListGlobalLicenses, request)); + assert( + (client.descriptors.page.listUserListGlobalLicenses.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserListGlobalLicensesStream with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListGlobalLicenses.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserListGlobalLicensesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListGlobalLicense[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListGlobalLicense) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserListGlobalLicenses.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListGlobalLicenses, request)); + assert( + (client.descriptors.page.listUserListGlobalLicenses.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListGlobalLicenses without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicense()), + ]; + client.descriptors.page.listUserListGlobalLicenses.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.datamanager.v1.IUserListGlobalLicense[] = []; + const iterable = client.listUserListGlobalLicensesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserListGlobalLicenses.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListGlobalLicenses.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListGlobalLicenses with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListGlobalLicenses.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserListGlobalLicensesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.datamanager.v1.IUserListGlobalLicense[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserListGlobalLicenses.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListGlobalLicenses.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listUserListGlobalLicenseCustomerInfos', () => { + it('invokes listUserListGlobalLicenseCustomerInfos without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + ]; + client.innerApiCalls.listUserListGlobalLicenseCustomerInfos = stubSimpleCall(expectedResponse); + const [response] = await client.listUserListGlobalLicenseCustomerInfos(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicenseCustomerInfos without error using callback', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + ]; + client.innerApiCalls.listUserListGlobalLicenseCustomerInfos = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserListGlobalLicenseCustomerInfos( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicenseCustomerInfos with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserListGlobalLicenseCustomerInfos = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserListGlobalLicenseCustomerInfos(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserListGlobalLicenseCustomerInfos as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListGlobalLicenseCustomerInfosStream without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + ]; + client.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserListGlobalLicenseCustomerInfosStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo) => { + 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.listUserListGlobalLicenseCustomerInfos.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListGlobalLicenseCustomerInfos, request)); + assert( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserListGlobalLicenseCustomerInfosStream with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserListGlobalLicenseCustomerInfosStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserListGlobalLicenseCustomerInfos, request)); + assert( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListGlobalLicenseCustomerInfos without error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo()), + ]; + client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[] = []; + const iterable = client.listUserListGlobalLicenseCustomerInfosAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserListGlobalLicenseCustomerInfos with error', async () => { + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserListGlobalLicenseCustomerInfosAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserListGlobalLicenseCustomerInfos.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('account', async () => { + const fakePath = "/rendered/path/account"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.accountPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.accountPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath("accountTypeValue", "accountValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromAccountName', () => { + const result = client.matchAccountTypeFromAccountName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new userlistgloballicenseserviceModule.v1.UserListGlobalLicenseServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts new file mode 100644 index 00000000000..be3072a90ac --- /dev/null +++ b/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts @@ -0,0 +1,1221 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 userlistserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +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); +} + +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.UserListServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new userlistserviceModule.v1.UserListServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new userlistserviceModule.v1.UserListServiceClient(); + 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 = userlistserviceModule.v1.UserListServiceClient.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 = userlistserviceModule.v1.UserListServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'datamanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new userlistserviceModule.v1.UserListServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'datamanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new userlistserviceModule.v1.UserListServiceClient({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 userlistserviceModule.v1.UserListServiceClient(); + 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 userlistserviceModule.v1.UserListServiceClient({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 userlistserviceModule.v1.UserListServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = userlistserviceModule.v1.UserListServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new userlistserviceModule.v1.UserListServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListServiceStub, undefined); + await client.initialize(); + assert(client.userListServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.userListServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.userListServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new userlistserviceModule.v1.UserListServiceClient({ + 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 userlistserviceModule.v1.UserListServiceClient({ + 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('getUserList', () => { + it('invokes getUserList without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.getUserList = stubSimpleCall(expectedResponse); + const [response] = await client.getUserList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserList without error using callback', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.getUserList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserList( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserList with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserList(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserList with closed client', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.GetUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.GetUserListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getUserList(request), expectedError); + }); + }); + + describe('createUserList', () => { + it('invokes createUserList without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.createUserList = stubSimpleCall(expectedResponse); + const [response] = await client.createUserList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserList without error using callback', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.createUserList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserList( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserList with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserList(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserList with closed client', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.CreateUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.CreateUserListRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createUserList(request), expectedError); + }); + }); + + describe('updateUserList', () => { + it('invokes updateUserList without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListRequest() + ); + request.userList ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListRequest', ['userList', 'name']); + request.userList.name = defaultValue1; + const expectedHeaderRequestParams = `user_list.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.updateUserList = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserList without error using callback', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListRequest() + ); + request.userList ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListRequest', ['userList', 'name']); + request.userList.name = defaultValue1; + const expectedHeaderRequestParams = `user_list.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.ads.datamanager.v1.UserList() + ); + client.innerApiCalls.updateUserList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserList( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserList|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserList with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListRequest() + ); + request.userList ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListRequest', ['userList', 'name']); + request.userList.name = defaultValue1; + const expectedHeaderRequestParams = `user_list.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserList(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserList with closed client', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.UpdateUserListRequest() + ); + request.userList ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.UpdateUserListRequest', ['userList', 'name']); + request.userList.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateUserList(request), expectedError); + }); + }); + + describe('deleteUserList', () => { + it('invokes deleteUserList without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeleteUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeleteUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserList = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserList(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserList without error using callback', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeleteUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeleteUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserList = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserList( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserList with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeleteUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeleteUserListRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserList = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteUserList(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserList as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserList with closed client', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.DeleteUserListRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.DeleteUserListRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteUserList(request), expectedError); + }); + }); + + describe('listUserLists', () => { + it('invokes listUserLists without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + ]; + client.innerApiCalls.listUserLists = stubSimpleCall(expectedResponse); + const [response] = await client.listUserLists(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserLists without error using callback', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + ]; + client.innerApiCalls.listUserLists = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserLists( + request, + (err?: Error|null, result?: protos.google.ads.datamanager.v1.IUserList[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserLists with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserLists = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserLists(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserLists as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserListsStream without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + ]; + client.descriptors.page.listUserLists.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserList[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserList) => { + 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.listUserLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserLists, request)); + assert( + (client.descriptors.page.listUserLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserListsStream with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserLists.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ads.datamanager.v1.UserList[] = []; + stream.on('data', (response: protos.google.ads.datamanager.v1.UserList) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserLists.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserLists, request)); + assert( + (client.descriptors.page.listUserLists.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserLists without error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + generateSampleMessage(new protos.google.ads.datamanager.v1.UserList()), + ]; + client.descriptors.page.listUserLists.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ads.datamanager.v1.IUserList[] = []; + const iterable = client.listUserListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserLists with error', async () => { + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.ads.datamanager.v1.ListUserListsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.ads.datamanager.v1.ListUserListsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ads.datamanager.v1.IUserList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserLists.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserLists.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('account', async () => { + const fakePath = "/rendered/path/account"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.accountPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.accountPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath("accountTypeValue", "accountValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromAccountName', () => { + const result = client.matchAccountTypeFromAccountName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new userlistserviceModule.v1.UserListServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-ads-datamanager/tsconfig.json b/owl-bot-staging/google-ads-datamanager/tsconfig.json new file mode 100644 index 00000000000..ca73e7bfc82 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-ads-datamanager/webpack.config.js b/owl-bot-staging/google-ads-datamanager/webpack.config.js new file mode 100644 index 00000000000..1e866c6c232 --- /dev/null +++ b/owl-bot-staging/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', +}; From e1e4557cd8a91245849b405c78b90d13ef1422ef Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 21 Feb 2026 00:28:37 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-ads-datamanager/.eslintignore | 7 - .../google-ads-datamanager/.eslintrc.json | 3 - .../google-ads-datamanager/.gitattributes | 4 - .../google-ads-datamanager/.gitignore | 14 - .../google-ads-datamanager/.jsdoc.js | 55 - .../google-ads-datamanager/.mocharc.js | 33 - owl-bot-staging/google-ads-datamanager/.nycrc | 24 - .../google-ads-datamanager/.prettierignore | 6 - .../google-ads-datamanager/.prettierrc.js | 22 - .../google-ads-datamanager/CODE_OF_CONDUCT.md | 94 - .../google-ads-datamanager/CONTRIBUTING.md | 76 - .../google-ads-datamanager/LICENSE | 202 - .../google-ads-datamanager/README.md | 135 - .../google/ads/datamanager/v1/audience.proto | 102 - .../google/ads/datamanager/v1/cart_data.proto | 72 - .../google/ads/datamanager/v1/consent.proto | 50 - .../ads/datamanager/v1/destination.proto | 130 - .../ads/datamanager/v1/device_info.proto | 46 - .../ads/datamanager/v1/encryption_info.proto | 100 - .../google/ads/datamanager/v1/error.proto | 339 - .../google/ads/datamanager/v1/event.proto | 189 - .../datamanager/v1/experimental_field.proto | 36 - .../datamanager/v1/ingestion_service.proto | 239 - .../ads/datamanager/v1/item_parameter.proto | 39 - .../ads/datamanager/v1/match_rate.proto | 62 - .../datamanager/v1/processing_errors.proto | 190 - .../v1/request_status_per_destination.proto | 264 - .../ads/datamanager/v1/terms_of_service.proto | 51 - .../google/ads/datamanager/v1/user_data.proto | 74 - .../ads/datamanager/v1/user_properties.proto | 87 - .../google-ads-datamanager/protos/protos.d.ts | 18315 ------ .../google-ads-datamanager/protos/protos.js | 48872 ---------------- .../google-ads-datamanager/protos/protos.json | 5456 -- ...gestion_service.ingest_audience_members.js | 100 - .../v1/ingestion_service.ingest_events.js | 96 - ...gestion_service.remove_audience_members.js | 85 - ...gestion_service.retrieve_request_status.js | 61 - ...et_metadata_google.ads.datamanager.v1.json | 1063 - .../google-ads-datamanager/src/index.ts | 37 - .../src/v1/gapic_metadata.json | 333 - .../google-ads-datamanager/src/v1/index.ts | 24 - .../src/v1/ingestion_service_client.ts | 1048 - .../v1/ingestion_service_client_config.json | 42 - .../src/v1/ingestion_service_proto_list.json | 34 - .../system-test/fixtures/sample/src/index.js | 32 - .../system-test/fixtures/sample/src/index.ts | 62 - .../system-test/install.ts | 49 - .../test/gapic_ingestion_service_v1.ts | 755 - .../google-ads-datamanager/tsconfig.json | 22 - .../google-ads-datamanager/webpack.config.js | 64 - packages/google-ads-datamanager/README.md | 18 + .../google/ads/datamanager/v1/age_range.proto | 0 .../google/ads/datamanager/v1/audience.proto | 29 + .../ads/datamanager/v1/destination.proto | 8 + .../google/ads/datamanager/v1/error.proto | 148 + .../google/ads/datamanager/v1/event.proto | 2 +- .../google/ads/datamanager/v1/gender.proto | 0 .../ads/datamanager/v1/insights_service.proto | 0 .../datamanager/v1/partner_link_service.proto | 0 .../v1/request_status_per_destination.proto | 66 + .../google/ads/datamanager/v1/user_list.proto | 0 .../v1/user_list_direct_license.proto | 0 .../v1/user_list_direct_license_service.proto | 0 .../v1/user_list_global_license.proto | 0 .../v1/user_list_global_license_service.proto | 0 .../v1/user_list_global_license_type.proto | 0 ...ser_list_license_client_account_type.proto | 0 .../v1/user_list_license_metrics.proto | 0 .../v1/user_list_license_pricing.proto | 0 .../v1/user_list_license_status.proto | 0 .../datamanager/v1/user_list_service.proto | 0 .../google-ads-datamanager/protos/protos.d.ts | 7420 ++- .../google-ads-datamanager/protos/protos.js | 19267 +++++- .../google-ads-datamanager/protos/protos.json | 2505 +- ...data_insights_service.retrieve_insights.js | 0 ...artner_link_service.create_partner_link.js | 0 ...artner_link_service.delete_partner_link.js | 0 ...rtner_link_service.search_partner_links.js | 0 ...et_metadata_google.ads.datamanager.v1.json | 828 + ...service.create_user_list_direct_license.js | 0 ...se_service.get_user_list_direct_license.js | 0 ..._service.list_user_list_direct_licenses.js | 0 ...service.update_user_list_direct_license.js | 0 ...service.create_user_list_global_license.js | 0 ...se_service.get_user_list_global_license.js | 0 ...user_list_global_license_customer_infos.js | 0 ..._service.list_user_list_global_licenses.js | 0 ...service.update_user_list_global_license.js | 0 .../v1/user_list_service.create_user_list.js | 0 .../v1/user_list_service.delete_user_list.js | 0 .../v1/user_list_service.get_user_list.js | 0 .../v1/user_list_service.list_user_lists.js | 0 .../v1/user_list_service.update_user_list.js | 0 packages/google-ads-datamanager/src/index.ts | 14 +- .../src/v1/gapic_metadata.json | 270 + .../google-ads-datamanager/src/v1/index.ts | 5 + .../src/v1/ingestion_service_client.ts | 283 + .../src/v1/ingestion_service_proto_list.json | 15 + .../marketing_data_insights_service_client.ts | 0 ...g_data_insights_service_client_config.json | 0 ...ting_data_insights_service_proto_list.json | 0 .../src/v1/partner_link_service_client.ts | 0 .../partner_link_service_client_config.json | 0 .../v1/partner_link_service_proto_list.json | 0 ...user_list_direct_license_service_client.ts | 0 ..._direct_license_service_client_config.json | 0 ...ist_direct_license_service_proto_list.json | 0 ...user_list_global_license_service_client.ts | 0 ..._global_license_service_client_config.json | 0 ...ist_global_license_service_proto_list.json | 0 .../src/v1/user_list_service_client.ts | 0 .../v1/user_list_service_client_config.json | 0 .../src/v1/user_list_service_proto_list.json | 0 .../system-test/fixtures/sample/src/index.js | 5 + .../system-test/fixtures/sample/src/index.ts | 32 +- .../test/gapic_ingestion_service_v1.ts | 241 + ...apic_marketing_data_insights_service_v1.ts | 0 .../test/gapic_partner_link_service_v1.ts | 0 ...pic_user_list_direct_license_service_v1.ts | 0 ...pic_user_list_global_license_service_v1.ts | 0 .../test/gapic_user_list_service_v1.ts | 0 121 files changed, 29739 insertions(+), 80712 deletions(-) delete mode 100644 owl-bot-staging/google-ads-datamanager/.eslintignore delete mode 100644 owl-bot-staging/google-ads-datamanager/.eslintrc.json delete mode 100644 owl-bot-staging/google-ads-datamanager/.gitattributes delete mode 100644 owl-bot-staging/google-ads-datamanager/.gitignore delete mode 100644 owl-bot-staging/google-ads-datamanager/.jsdoc.js delete mode 100644 owl-bot-staging/google-ads-datamanager/.mocharc.js delete mode 100644 owl-bot-staging/google-ads-datamanager/.nycrc delete mode 100644 owl-bot-staging/google-ads-datamanager/.prettierignore delete mode 100644 owl-bot-staging/google-ads-datamanager/.prettierrc.js delete mode 100644 owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md delete mode 100644 owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md delete mode 100644 owl-bot-staging/google-ads-datamanager/LICENSE delete mode 100644 owl-bot-staging/google-ads-datamanager/README.md delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.js delete mode 100644 owl-bot-staging/google-ads-datamanager/protos/protos.json delete mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js delete mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js delete mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js delete mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js delete mode 100644 owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json delete mode 100644 owl-bot-staging/google-ads-datamanager/src/index.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/index.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json delete mode 100644 owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json delete mode 100644 owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/system-test/install.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts delete mode 100644 owl-bot-staging/google-ads-datamanager/tsconfig.json delete mode 100644 owl-bot-staging/google-ads-datamanager/webpack.config.js rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/partner_link_service_client.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/partner_link_service_client_config.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/partner_link_service_proto_list.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_service_client.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_service_client_config.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/src/v1/user_list_service_proto_list.json (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/test/gapic_partner_link_service_v1.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts (100%) rename {owl-bot-staging => packages}/google-ads-datamanager/test/gapic_user_list_service_v1.ts (100%) diff --git a/owl-bot-staging/google-ads-datamanager/.eslintignore b/owl-bot-staging/google-ads-datamanager/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-ads-datamanager/.eslintrc.json b/owl-bot-staging/google-ads-datamanager/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-ads-datamanager/.gitattributes b/owl-bot-staging/google-ads-datamanager/.gitattributes deleted file mode 100644 index 33739cb74e4..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -*.ts text eol=lf -*.js text eol=lf -protos/* linguist-generated -**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-ads-datamanager/.gitignore b/owl-bot-staging/google-ads-datamanager/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/google-ads-datamanager/.jsdoc.js b/owl-bot-staging/google-ads-datamanager/.jsdoc.js deleted file mode 100644 index 67b7a465bac..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-ads/datamanager', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-ads-datamanager/.mocharc.js b/owl-bot-staging/google-ads-datamanager/.mocharc.js deleted file mode 100644 index 5eb34e86c87..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/.nycrc b/owl-bot-staging/google-ads-datamanager/.nycrc deleted file mode 100644 index 81a95fc94b0..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/owl-bot-staging/google-ads-datamanager/.prettierignore b/owl-bot-staging/google-ads-datamanager/.prettierignore deleted file mode 100644 index 9340ad9b86d..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/owl-bot-staging/google-ads-datamanager/.prettierrc.js b/owl-bot-staging/google-ads-datamanager/.prettierrc.js deleted file mode 100644 index 7649ee3c254..00000000000 --- a/owl-bot-staging/google-ads-datamanager/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md b/owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md deleted file mode 100644 index 2add2547a81..00000000000 --- a/owl-bot-staging/google-ads-datamanager/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,94 +0,0 @@ - -# 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/owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md b/owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md deleted file mode 100644 index 07abc83b301..00000000000 --- a/owl-bot-staging/google-ads-datamanager/CONTRIBUTING.md +++ /dev/null @@ -1,76 +0,0 @@ -# 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/owl-bot-staging/google-ads-datamanager/LICENSE b/owl-bot-staging/google-ads-datamanager/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/owl-bot-staging/google-ads-datamanager/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/owl-bot-staging/google-ads-datamanager/README.md b/owl-bot-staging/google-ads-datamanager/README.md deleted file mode 100644 index a1888aea2a6..00000000000 --- a/owl-bot-staging/google-ads-datamanager/README.md +++ /dev/null @@ -1,135 +0,0 @@ -[//]: # "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) | -| retrieve insights | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js) | -| create partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js) | -| delete partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js) | -| search partner links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.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) | -| create user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js) | -| get user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js) | -| list user list direct licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js) | -| update user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js) | -| create user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js) | -| get user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js) | -| list user list global license customer infos | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js) | -| list user list global licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js) | -| update user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js) | -| create user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js) | -| delete user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js) | -| get user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js) | -| list user lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js) | -| update user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js) | - - -## 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto deleted file mode 100644 index a4a0d368b32..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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). - // - // This feature is only available to data partners. - PairData pair_data = 4; - - // Data identifying the user's mobile devices. - MobileData mobile_data = 5; - - // Data related to unique identifiers for a user, as defined by the - // advertiser. - UserIdData user_id_data = 6; - - // Data related to publisher provided identifiers. - // - // This feature is only available to data partners. - PpidData ppid_data = 7; - } - - // 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. -// -// This feature is only available to data partners. -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]; -} - -// User id data holding the user id. -message UserIdData { - // Required. A unique identifier for a user, as defined by the - // advertiser. - string user_id = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Publisher provided identifiers data holding the ppids. At least one ppid is -// required. -// -// This feature is only available to data partners. -message PpidData { - // Required. The list of publisher provided identifiers for a user. - repeated string ppids = 1 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto deleted file mode 100644 index 5ddd8d9ba6f..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/cart_data.proto +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/item_parameter.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Ads.DataManager.V1"; -option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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]; - - // Optional. A unique identifier to reference the item. - string item_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A bucket of any [event parameters related to an - // item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) - // to be included within the event that were not already specified using other - // structured fields. - repeated ItemParameter additional_item_parameters = 5 - [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto deleted file mode 100644 index 4fec4a414c5..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/consent.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto deleted file mode 100644 index 40d204e187c..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Ads.DataManager.V1"; -option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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"; -option (google.api.resource_definition) = { - type: "datamanager.googleapis.com/Account" - pattern: "accountTypes/{account_type}/accounts/{account}" -}; - -// 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; - - // Google Analytics. - GOOGLE_ANALYTICS_PROPERTY = 5; - - // Google Ad Manager audience link. - GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6; - } - - // 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto deleted file mode 100644 index 702c6022c03..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/device_info.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto deleted file mode 100644 index 365e5cd12e0..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/encryption_info.proto +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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; - - // Amazon Web Services wrapped key information. - AwsWrappedKeyInfo aws_wrapped_key_info = 2; - } -} - -// 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}` - // or - // `gcp-kms://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]; -} - -// A data encryption key wrapped by an AWS KMS key. -message AwsWrappedKeyInfo { - // 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 Amazon Resource Name of the IAM Role to assume for KMS - // decryption access. Should be in the format of - // `arn:{partition}:iam::{account_id}:role/{role_name}` - string role_arn = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The URI of the AWS KMS key used to decrypt the DEK. Should be in - // the format of `arn:{partition}:kms:{region}:{account_id}:key/{key_id}` or - // `aws-kms://arn:{partition}:kms:{region}:{account_id}:key/{key_id}` - 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto deleted file mode 100644 index 8abaf0ad934..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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. -// NOTE: This enum is not frozen and new values may be added in the future. -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; - - // Unsupported operating account for data partner authorization. - UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER = 37; - - // Unsupported linked account for data partner authorization. - UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER = 38; - - // Events data contains no user identifiers or ad identifiers. - NO_IDENTIFIERS_PROVIDED = 39; - - // The property type is not supported. - INVALID_PROPERTY_TYPE = 40; - - // The stream type is not supported. - INVALID_STREAM_TYPE = 41; - - // Linked account is only supported when the login account is a `DATA_PARTNER` - // account. - LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT = 42; - - // The login account must be the same as the operating account for the given - // use case. - OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH = 43; - - // Event did not occur within the acceptable time window. - EVENT_TIME_INVALID = 44; - - // Parameter uses a reserved name. - RESERVED_NAME_USED = 45; - - // The event name is not supported. - INVALID_EVENT_NAME = 46; - - // The account is not allowlisted for the given feature. - NOT_ALLOWLISTED = 47; - - // 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; - - // An event had 2 or more Google Analytics destinations. - MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT = 49; - - // The field value is too long. - FIELD_VALUE_TOO_LONG = 50; - - // Too many elements in a list in the request. - TOO_MANY_ELEMENTS = 51; - - // The resource already exists. - ALREADY_EXISTS = 52; - - // Attempted to set an immutable field for an update request. - IMMUTABLE_FIELD_FOR_UPDATE = 53; - - // The resource name is invalid. - INVALID_RESOURCE_NAME = 54; - - // The query filter is invalid. - INVALID_FILTER = 55; - - // The update mask is invalid. - INVALID_UPDATE_MASK = 56; - - // The page token is invalid. - INVALID_PAGE_TOKEN = 57; - - // Cannot update a license that has been disabled. - CANNOT_UPDATE_DISABLED_LICENSE = 58; - - // Sensitive user lists cannot be licensed to this client. - CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59; - - // Cost too low for this license. - INSUFFICIENT_COST = 60; - - // Reseller license cannot be disabled since it is in use. - CANNOT_DISABLE_LICENSE = 61; - - // Invalid client account id. - INVALID_CLIENT_ACCOUNT_ID = 62; - - // Non-zero cost not allowed for this client account. - PRICING_ONLY_ZERO_COST_ALLOWED = 63; - - // Cost too high for this license. - PRICE_TOO_HIGH = 64; - - // Customer not allowed to create license. - CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65; - - // Pricing end date is invalid for this license. - INVALID_PRICING_END_DATE = 66; - - // Logical user list with shared or licensed segment cannot be licensed. - CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67; - - // Client customer's account type in the request does not match the customer's - // actual account type. - MISMATCHED_ACCOUNT_TYPE = 68; - - // License type does not support media share cost. - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69; - - // Client customer type does not support media share cost. - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70; - - // Invalid media share cost. - INVALID_MEDIA_SHARE_COST = 71; - - // Invalid cost type. - INVALID_COST_TYPE = 72; - - // UserList type does not support media share cost. - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73; - - // Max cost is only allowed for cost_type MEDIA_SHARE. - MAX_COST_NOT_ALLOWED = 74; - - // Commerce audience can only be directly licensed. - COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75; - - // The description is not valid. - INVALID_DESCRIPTION = 76; - - // The display name is not valid. - INVALID_DISPLAY_NAME = 77; - - // The display name is already being used for another user list for the - // account. - DISPLAY_NAME_ALREADY_USED = 78; - - // Ownership is required to modify the user list. - OWNERSHIP_REQUIRED_FOR_UPDATE = 79; - - // The user list type is read-only and does not support mutation. - USER_LIST_MUTATION_NOT_SUPPORTED = 80; - - // A user list which is privacy sensitive or legal rejected cannot be mutated - // by external users. - SENSITIVE_USER_LIST_IMMUTABLE = 81; - - // The remarketing user list's billable record field cannot be modified once - // it is set. - BILLABLE_RECORD_COUNT_IMMUTABLE = 82; - - // The user list name is reserved for system lists. - USER_LIST_NAME_RESERVED = 83; - - // The advertiser needs to be allowlisted to use remarketing lists created - // from advertiser uploaded data. - ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84; - - // The partner audience source is not supported for the user list type. - UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85; - - // Setting the `commerce_partner` field is only supported if the - // `partner_audience_source` is `COMMERCE_AUDIENCE`. - COMMERCE_PARTNER_NOT_ALLOWED = 86; - - // The `partner_audience_info` field is not supported for the user list type. - UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87; - - // Partner Match user lists cannot be created by manager accounts. - PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88; - - // The data partner is not allowlisted for THIRD_PARTY_PARTNER_DATA. - DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89; - - // The advertiser has not accepted the partner's terms of service. - ADVERTISER_TOS_NOT_ACCEPTED = 90; - - // The advertiser is not allowlisted for THIRD_PARTY_PARTNER_DATA. - ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91; - - // This user list type is not supported for this account. - USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92; - - // The `commerce_partner` field is invalid. - INVALID_COMMERCE_PARTNER = 93; - - // The data provider is not allowlisted to create commerce audiences. - CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94; - - // The user list upload key types are not supported. - UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95; - - // The ingested user list info config is not supported. - UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96; - - // The account types are not supported for the user list type. - UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97; - - // The account types are not supported for the partner link. - UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98; -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto deleted file mode 100644 index 0bd6ddd9c3a..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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. - optional 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]; - - // Optional. The name of the event. Required for GA4 events. - string event_name = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique identifier for the user instance of a web client for - // this GA4 web stream. - string client_id = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique identifier for a user, as defined by the advertiser. - string user_id = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A bucket of any [event - // parameters](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) - // to be included within the event that were not already specified using other - // structured fields. - repeated EventParameter additional_event_parameters = 19 - [(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]; -} - -// Event parameter for GA4 events. -message EventParameter { - // Required. The name of the parameter to use. - string parameter_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The string representation of the value of the parameter to set. - string value = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// 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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto deleted file mode 100644 index da9eb106398..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/experimental_field.proto +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto deleted file mode 100644 index d388f7691b9..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/ingestion_service.proto +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto deleted file mode 100644 index 59ae9e3e233..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/item_parameter.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -option java_multiple_files = true; -option java_outer_classname = "ItemParameterProto"; -option java_package = "com.google.ads.datamanager.v1"; -option php_namespace = "Google\\Ads\\DataManager\\V1"; -option ruby_package = "Google::Ads::DataManager::V1"; - -// A bucket of any [event parameters related to an -// item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) -// to be included within the event that were not already specified using other -// structured fields. -message ItemParameter { - // Required. The name of the parameter to use. - string parameter_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The string representation of the value of the parameter to set. - string value = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto deleted file mode 100644 index 1fdfc7ed9ef..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/match_rate.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto deleted file mode 100644 index c2d77837de5..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/processing_errors.proto +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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; - - // The system failed to authenticate with AWS. - PROCESSING_ERROR_REASON_AWS_AUTH_FAILED = 27; - - // 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; - - // The system failed to authenticate with AWS. - PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9; -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto deleted file mode 100644 index 64ca0cbe033..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/request_status_per_destination.proto +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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 user id data ingestion to the destination. - IngestUserIdDataStatus user_id_data_ingestion_status = 4; - - // The status of the ppid data ingestion to the destination. - IngestPpidDataStatus ppid_data_ingestion_status = 5; - } - } - - // 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 user id data removal from the destination. - RemoveUserIdDataStatus user_id_data_removal_status = 4; - - // The status of the ppid data removal from the destination. - RemovePpidDataStatus ppid_data_removal_status = 5; - } - } - - // 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; - } - - // The status of the user id data ingestion to the destination containing - // stats related to the ingestion. - message IngestUserIdDataStatus { - // 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 ids sent in the upload request for the - // destination. Includes all user ids in the request, regardless of - // whether they were successfully ingested or not. - int64 user_id_count = 2; - } - - // The status of the user id data removal from the destination. - message RemoveUserIdDataStatus { - // 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 ids sent in the removal request. Includes all - // user ids in the request, regardless of whether they were successfully - // removed or not. - int64 user_id_count = 2; - } - - // The status of the ppid data ingestion to the destination containing stats - // related to the ingestion. - message IngestPpidDataStatus { - // 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 ppids sent in the upload request for the - // destination. Includes all ppids in the request, regardless of - // whether they were successfully ingested or not. - int64 ppid_count = 2; - } - - // The status of the ppid data removal from the destination. - message RemovePpidDataStatus { - // 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 ppids sent in the removal request. Includes all - // ppids in the request, regardless of whether they were successfully - // removed or not. - int64 ppid_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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto deleted file mode 100644 index c4231dfa5aa..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/terms_of_service.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto deleted file mode 100644 index 887c02b30e9..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_data.proto +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto b/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto deleted file mode 100644 index 75c59e2b030..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_properties.proto +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; -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]; - - // Optional. A bucket of any additional [user - // properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) - // for the user associated with this event. - repeated UserProperty additional_user_properties = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A bucket of any additional [user -// properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) -// for the user associated with this event. -message UserProperty { - // Required. The name of the user property to use. - string property_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The string representation of the value of the user property to - // use. - string value = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// 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/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts b/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts deleted file mode 100644 index db34d7f0bd5..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/protos.d.ts +++ /dev/null @@ -1,18315 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 { - - /** AgeRange enum. */ - enum AgeRange { - AGE_RANGE_UNSPECIFIED = 0, - AGE_RANGE_UNKNOWN = 1, - AGE_RANGE_18_24 = 2, - AGE_RANGE_25_34 = 3, - AGE_RANGE_35_44 = 4, - AGE_RANGE_45_54 = 5, - AGE_RANGE_55_64 = 6, - AGE_RANGE_65_UP = 7 - } - - /** 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 userIdData */ - userIdData?: (google.ads.datamanager.v1.IUserIdData|null); - - /** AudienceMember ppidData */ - ppidData?: (google.ads.datamanager.v1.IPpidData|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 userIdData. */ - public userIdData?: (google.ads.datamanager.v1.IUserIdData|null); - - /** AudienceMember ppidData. */ - public ppidData?: (google.ads.datamanager.v1.IPpidData|null); - - /** AudienceMember consent. */ - public consent?: (google.ads.datamanager.v1.IConsent|null); - - /** AudienceMember data. */ - public data?: ("userData"|"pairData"|"mobileData"|"userIdData"|"ppidData"); - - /** - * 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 UserIdData. */ - interface IUserIdData { - - /** UserIdData userId */ - userId?: (string|null); - } - - /** Represents a UserIdData. */ - class UserIdData implements IUserIdData { - - /** - * Constructs a new UserIdData. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserIdData); - - /** UserIdData userId. */ - public userId: string; - - /** - * Creates a new UserIdData instance using the specified properties. - * @param [properties] Properties to set - * @returns UserIdData instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserIdData): google.ads.datamanager.v1.UserIdData; - - /** - * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. - * @param message UserIdData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. - * @param message UserIdData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserIdData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserIdData - * @throws {Error} If the payload is not a 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.UserIdData; - - /** - * Decodes a UserIdData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserIdData - * @throws {Error} If the payload is 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.UserIdData; - - /** - * Verifies a UserIdData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserIdData - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdData; - - /** - * Creates a plain object from a UserIdData message. Also converts values to other types if specified. - * @param message UserIdData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserIdData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserIdData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserIdData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PpidData. */ - interface IPpidData { - - /** PpidData ppids */ - ppids?: (string[]|null); - } - - /** Represents a PpidData. */ - class PpidData implements IPpidData { - - /** - * Constructs a new PpidData. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IPpidData); - - /** PpidData ppids. */ - public ppids: string[]; - - /** - * Creates a new PpidData instance using the specified properties. - * @param [properties] Properties to set - * @returns PpidData instance - */ - public static create(properties?: google.ads.datamanager.v1.IPpidData): google.ads.datamanager.v1.PpidData; - - /** - * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. - * @param message PpidData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. - * @param message PpidData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PpidData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PpidData - * @throws {Error} If the payload is not a 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.PpidData; - - /** - * Decodes a PpidData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PpidData - * @throws {Error} If the payload is 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.PpidData; - - /** - * Verifies a PpidData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PpidData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PpidData - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PpidData; - - /** - * Creates a plain object from a PpidData message. Also converts values to other types if specified. - * @param message PpidData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.PpidData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PpidData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PpidData - * @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); - - /** Item itemId */ - itemId?: (string|null); - - /** Item additionalItemParameters */ - additionalItemParameters?: (google.ads.datamanager.v1.IItemParameter[]|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; - - /** Item itemId. */ - public itemId: string; - - /** Item additionalItemParameters. */ - public additionalItemParameters: google.ads.datamanager.v1.IItemParameter[]; - - /** - * 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 an ItemParameter. */ - interface IItemParameter { - - /** ItemParameter parameterName */ - parameterName?: (string|null); - - /** ItemParameter value */ - value?: (string|null); - } - - /** Represents an ItemParameter. */ - class ItemParameter implements IItemParameter { - - /** - * Constructs a new ItemParameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IItemParameter); - - /** ItemParameter parameterName. */ - public parameterName: string; - - /** ItemParameter value. */ - public value: string; - - /** - * Creates a new ItemParameter instance using the specified properties. - * @param [properties] Properties to set - * @returns ItemParameter instance - */ - public static create(properties?: google.ads.datamanager.v1.IItemParameter): google.ads.datamanager.v1.ItemParameter; - - /** - * Encodes the specified ItemParameter message. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. - * @param message ItemParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IItemParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ItemParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. - * @param message ItemParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IItemParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ItemParameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ItemParameter - * @throws {Error} If the payload is not a 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.ItemParameter; - - /** - * Decodes an ItemParameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ItemParameter - * @throws {Error} If the payload is 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.ItemParameter; - - /** - * Verifies an ItemParameter message. - * @param message Plain 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 ItemParameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ItemParameter - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ItemParameter; - - /** - * Creates a plain object from an ItemParameter message. Also converts values to other types if specified. - * @param message ItemParameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ItemParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ItemParameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ItemParameter - * @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, - GOOGLE_ANALYTICS_PROPERTY = 5, - GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6 - } - } - - /** 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); - - /** EncryptionInfo awsWrappedKeyInfo */ - awsWrappedKeyInfo?: (google.ads.datamanager.v1.IAwsWrappedKeyInfo|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 awsWrappedKeyInfo. */ - public awsWrappedKeyInfo?: (google.ads.datamanager.v1.IAwsWrappedKeyInfo|null); - - /** EncryptionInfo wrappedKey. */ - public wrappedKey?: ("gcpWrappedKeyInfo"|"awsWrappedKeyInfo"); - - /** - * 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 - } - } - - /** Properties of an AwsWrappedKeyInfo. */ - interface IAwsWrappedKeyInfo { - - /** AwsWrappedKeyInfo keyType */ - keyType?: (google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|null); - - /** AwsWrappedKeyInfo roleArn */ - roleArn?: (string|null); - - /** AwsWrappedKeyInfo kekUri */ - kekUri?: (string|null); - - /** AwsWrappedKeyInfo encryptedDek */ - encryptedDek?: (string|null); - } - - /** Represents an AwsWrappedKeyInfo. */ - class AwsWrappedKeyInfo implements IAwsWrappedKeyInfo { - - /** - * Constructs a new AwsWrappedKeyInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IAwsWrappedKeyInfo); - - /** AwsWrappedKeyInfo keyType. */ - public keyType: (google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|keyof typeof google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType); - - /** AwsWrappedKeyInfo roleArn. */ - public roleArn: string; - - /** AwsWrappedKeyInfo kekUri. */ - public kekUri: string; - - /** AwsWrappedKeyInfo encryptedDek. */ - public encryptedDek: string; - - /** - * Creates a new AwsWrappedKeyInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AwsWrappedKeyInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IAwsWrappedKeyInfo): google.ads.datamanager.v1.AwsWrappedKeyInfo; - - /** - * Encodes the specified AwsWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. - * @param message AwsWrappedKeyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IAwsWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AwsWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. - * @param message AwsWrappedKeyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IAwsWrappedKeyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AwsWrappedKeyInfo - * @throws {Error} If the payload is not a 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.AwsWrappedKeyInfo; - - /** - * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AwsWrappedKeyInfo - * @throws {Error} If the payload is 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.AwsWrappedKeyInfo; - - /** - * Verifies an AwsWrappedKeyInfo message. - * @param message Plain 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 AwsWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AwsWrappedKeyInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.AwsWrappedKeyInfo; - - /** - * Creates a plain object from an AwsWrappedKeyInfo message. Also converts values to other types if specified. - * @param message AwsWrappedKeyInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.AwsWrappedKeyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AwsWrappedKeyInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AwsWrappedKeyInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AwsWrappedKeyInfo { - - /** 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, - UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER = 37, - UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER = 38, - NO_IDENTIFIERS_PROVIDED = 39, - INVALID_PROPERTY_TYPE = 40, - INVALID_STREAM_TYPE = 41, - LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT = 42, - OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH = 43, - EVENT_TIME_INVALID = 44, - RESERVED_NAME_USED = 45, - INVALID_EVENT_NAME = 46, - NOT_ALLOWLISTED = 47, - INVALID_REQUEST_ID = 48, - MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT = 49, - FIELD_VALUE_TOO_LONG = 50, - TOO_MANY_ELEMENTS = 51, - ALREADY_EXISTS = 52, - IMMUTABLE_FIELD_FOR_UPDATE = 53, - INVALID_RESOURCE_NAME = 54, - INVALID_FILTER = 55, - INVALID_UPDATE_MASK = 56, - INVALID_PAGE_TOKEN = 57, - CANNOT_UPDATE_DISABLED_LICENSE = 58, - CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59, - INSUFFICIENT_COST = 60, - CANNOT_DISABLE_LICENSE = 61, - INVALID_CLIENT_ACCOUNT_ID = 62, - PRICING_ONLY_ZERO_COST_ALLOWED = 63, - PRICE_TOO_HIGH = 64, - CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65, - INVALID_PRICING_END_DATE = 66, - CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67, - MISMATCHED_ACCOUNT_TYPE = 68, - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69, - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70, - INVALID_MEDIA_SHARE_COST = 71, - INVALID_COST_TYPE = 72, - MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73, - MAX_COST_NOT_ALLOWED = 74, - COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75, - INVALID_DESCRIPTION = 76, - INVALID_DISPLAY_NAME = 77, - DISPLAY_NAME_ALREADY_USED = 78, - OWNERSHIP_REQUIRED_FOR_UPDATE = 79, - USER_LIST_MUTATION_NOT_SUPPORTED = 80, - SENSITIVE_USER_LIST_IMMUTABLE = 81, - BILLABLE_RECORD_COUNT_IMMUTABLE = 82, - USER_LIST_NAME_RESERVED = 83, - ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84, - UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85, - COMMERCE_PARTNER_NOT_ALLOWED = 86, - UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87, - PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88, - DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89, - ADVERTISER_TOS_NOT_ACCEPTED = 90, - ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91, - USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92, - INVALID_COMMERCE_PARTNER = 93, - CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94, - UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95, - UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96, - UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97, - UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98 - } - - /** 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); - - /** Event eventName */ - eventName?: (string|null); - - /** Event clientId */ - clientId?: (string|null); - - /** Event userId */ - userId?: (string|null); - - /** Event additionalEventParameters */ - additionalEventParameters?: (google.ads.datamanager.v1.IEventParameter[]|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|null); - - /** 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); - - /** Event eventName. */ - public eventName: string; - - /** Event clientId. */ - public clientId: string; - - /** Event userId. */ - public userId: string; - - /** Event additionalEventParameters. */ - public additionalEventParameters: google.ads.datamanager.v1.IEventParameter[]; - - /** - * 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; - } - - /** Properties of an EventParameter. */ - interface IEventParameter { - - /** EventParameter parameterName */ - parameterName?: (string|null); - - /** EventParameter value */ - value?: (string|null); - } - - /** Represents an EventParameter. */ - class EventParameter implements IEventParameter { - - /** - * Constructs a new EventParameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IEventParameter); - - /** EventParameter parameterName. */ - public parameterName: string; - - /** EventParameter value. */ - public value: string; - - /** - * Creates a new EventParameter instance using the specified properties. - * @param [properties] Properties to set - * @returns EventParameter instance - */ - public static create(properties?: google.ads.datamanager.v1.IEventParameter): google.ads.datamanager.v1.EventParameter; - - /** - * Encodes the specified EventParameter message. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. - * @param message EventParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IEventParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. - * @param message EventParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IEventParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventParameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventParameter - * @throws {Error} If the payload is not a 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.EventParameter; - - /** - * Decodes an EventParameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventParameter - * @throws {Error} If the payload is 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.EventParameter; - - /** - * Verifies an EventParameter message. - * @param message Plain 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 EventParameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventParameter - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.EventParameter; - - /** - * Creates a plain object from an EventParameter message. Also converts values to other types if specified. - * @param message EventParameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.EventParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventParameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventParameter - * @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); - - /** UserProperties additionalUserProperties */ - additionalUserProperties?: (google.ads.datamanager.v1.IUserProperty[]|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); - - /** UserProperties additionalUserProperties. */ - public additionalUserProperties: google.ads.datamanager.v1.IUserProperty[]; - - /** - * 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; - } - - /** Properties of a UserProperty. */ - interface IUserProperty { - - /** UserProperty propertyName */ - propertyName?: (string|null); - - /** UserProperty value */ - value?: (string|null); - } - - /** Represents a UserProperty. */ - class UserProperty implements IUserProperty { - - /** - * Constructs a new UserProperty. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserProperty); - - /** UserProperty propertyName. */ - public propertyName: string; - - /** UserProperty value. */ - public value: string; - - /** - * Creates a new UserProperty instance using the specified properties. - * @param [properties] Properties to set - * @returns UserProperty instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserProperty): google.ads.datamanager.v1.UserProperty; - - /** - * Encodes the specified UserProperty message. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. - * @param message UserProperty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserProperty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserProperty message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. - * @param message UserProperty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserProperty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserProperty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserProperty - * @throws {Error} If the payload is not a 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.UserProperty; - - /** - * Decodes a UserProperty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserProperty - * @throws {Error} If the payload is 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.UserProperty; - - /** - * Verifies a UserProperty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserProperty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserProperty - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserProperty; - - /** - * Creates a plain object from a UserProperty message. Also converts values to other types if specified. - * @param message UserProperty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserProperty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserProperty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserProperty - * @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 - } - - /** Gender enum. */ - enum Gender { - GENDER_UNSPECIFIED = 0, - GENDER_UNKNOWN = 1, - GENDER_MALE = 2, - GENDER_FEMALE = 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); - - /** IngestAudienceMembersStatus userIdDataIngestionStatus */ - userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); - - /** IngestAudienceMembersStatus ppidDataIngestionStatus */ - ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|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 userIdDataIngestionStatus. */ - public userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); - - /** IngestAudienceMembersStatus ppidDataIngestionStatus. */ - public ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null); - - /** IngestAudienceMembersStatus status. */ - public status?: ("userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"); - - /** - * 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); - - /** RemoveAudienceMembersStatus userIdDataRemovalStatus */ - userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); - - /** RemoveAudienceMembersStatus ppidDataRemovalStatus */ - ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|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 userIdDataRemovalStatus. */ - public userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); - - /** RemoveAudienceMembersStatus ppidDataRemovalStatus. */ - public ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null); - - /** RemoveAudienceMembersStatus status. */ - public status?: ("userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"); - - /** - * 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; - } - - /** Properties of an IngestUserIdDataStatus. */ - interface IIngestUserIdDataStatus { - - /** IngestUserIdDataStatus recordCount */ - recordCount?: (number|Long|string|null); - - /** IngestUserIdDataStatus userIdCount */ - userIdCount?: (number|Long|string|null); - } - - /** Represents an IngestUserIdDataStatus. */ - class IngestUserIdDataStatus implements IIngestUserIdDataStatus { - - /** - * Constructs a new IngestUserIdDataStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus); - - /** IngestUserIdDataStatus recordCount. */ - public recordCount: (number|Long|string); - - /** IngestUserIdDataStatus userIdCount. */ - public userIdCount: (number|Long|string); - - /** - * Creates a new IngestUserIdDataStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns IngestUserIdDataStatus instance - */ - public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; - - /** - * Encodes the specified IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. - * @param message IngestUserIdDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. - * @param message IngestUserIdDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IngestUserIdDataStatus - * @throws {Error} If the payload is not a 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.IngestUserIdDataStatus; - - /** - * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IngestUserIdDataStatus - * @throws {Error} If the payload is 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.IngestUserIdDataStatus; - - /** - * Verifies an IngestUserIdDataStatus message. - * @param message Plain 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 IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IngestUserIdDataStatus - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; - - /** - * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. - * @param message IngestUserIdDataStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IngestUserIdDataStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IngestUserIdDataStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveUserIdDataStatus. */ - interface IRemoveUserIdDataStatus { - - /** RemoveUserIdDataStatus recordCount */ - recordCount?: (number|Long|string|null); - - /** RemoveUserIdDataStatus userIdCount */ - userIdCount?: (number|Long|string|null); - } - - /** Represents a RemoveUserIdDataStatus. */ - class RemoveUserIdDataStatus implements IRemoveUserIdDataStatus { - - /** - * Constructs a new RemoveUserIdDataStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus); - - /** RemoveUserIdDataStatus recordCount. */ - public recordCount: (number|Long|string); - - /** RemoveUserIdDataStatus userIdCount. */ - public userIdCount: (number|Long|string); - - /** - * Creates a new RemoveUserIdDataStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveUserIdDataStatus instance - */ - public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; - - /** - * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. - * @param message RemoveUserIdDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. - * @param message RemoveUserIdDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveUserIdDataStatus - * @throws {Error} If the payload is not a 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.RemoveUserIdDataStatus; - - /** - * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveUserIdDataStatus - * @throws {Error} If the payload is 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.RemoveUserIdDataStatus; - - /** - * Verifies a RemoveUserIdDataStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveUserIdDataStatus - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; - - /** - * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. - * @param message RemoveUserIdDataStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveUserIdDataStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveUserIdDataStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IngestPpidDataStatus. */ - interface IIngestPpidDataStatus { - - /** IngestPpidDataStatus recordCount */ - recordCount?: (number|Long|string|null); - - /** IngestPpidDataStatus ppidCount */ - ppidCount?: (number|Long|string|null); - } - - /** Represents an IngestPpidDataStatus. */ - class IngestPpidDataStatus implements IIngestPpidDataStatus { - - /** - * Constructs a new IngestPpidDataStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus); - - /** IngestPpidDataStatus recordCount. */ - public recordCount: (number|Long|string); - - /** IngestPpidDataStatus ppidCount. */ - public ppidCount: (number|Long|string); - - /** - * Creates a new IngestPpidDataStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns IngestPpidDataStatus instance - */ - public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; - - /** - * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. - * @param message IngestPpidDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. - * @param message IngestPpidDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IngestPpidDataStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IngestPpidDataStatus - * @throws {Error} If the payload is not a 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.IngestPpidDataStatus; - - /** - * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IngestPpidDataStatus - * @throws {Error} If the payload is 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.IngestPpidDataStatus; - - /** - * Verifies an IngestPpidDataStatus message. - * @param message Plain 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 IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IngestPpidDataStatus - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; - - /** - * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. - * @param message IngestPpidDataStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IngestPpidDataStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IngestPpidDataStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePpidDataStatus. */ - interface IRemovePpidDataStatus { - - /** RemovePpidDataStatus recordCount */ - recordCount?: (number|Long|string|null); - - /** RemovePpidDataStatus ppidCount */ - ppidCount?: (number|Long|string|null); - } - - /** Represents a RemovePpidDataStatus. */ - class RemovePpidDataStatus implements IRemovePpidDataStatus { - - /** - * Constructs a new RemovePpidDataStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus); - - /** RemovePpidDataStatus recordCount. */ - public recordCount: (number|Long|string); - - /** RemovePpidDataStatus ppidCount. */ - public ppidCount: (number|Long|string); - - /** - * Creates a new RemovePpidDataStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePpidDataStatus instance - */ - public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; - - /** - * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. - * @param message RemovePpidDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. - * @param message RemovePpidDataStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemovePpidDataStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePpidDataStatus - * @throws {Error} If the payload is not a 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.RemovePpidDataStatus; - - /** - * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePpidDataStatus - * @throws {Error} If the payload is 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.RemovePpidDataStatus; - - /** - * Verifies a RemovePpidDataStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePpidDataStatus - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; - - /** - * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. - * @param message RemovePpidDataStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemovePpidDataStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePpidDataStatus - * @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_AWS_AUTH_FAILED = 27, - 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, - PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9 - } - - /** 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 - } - - /** Represents a MarketingDataInsightsService */ - class MarketingDataInsightsService extends $protobuf.rpc.Service { - - /** - * Constructs a new MarketingDataInsightsService 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 MarketingDataInsightsService 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): MarketingDataInsightsService; - - /** - * Calls RetrieveInsights. - * @param request RetrieveInsightsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RetrieveInsightsResponse - */ - public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest, callback: google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback): void; - - /** - * Calls RetrieveInsights. - * @param request RetrieveInsightsRequest message or plain object - * @returns Promise - */ - public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest): Promise; - } - - namespace MarketingDataInsightsService { - - /** - * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. - * @param error Error, if any - * @param [response] RetrieveInsightsResponse - */ - type RetrieveInsightsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.RetrieveInsightsResponse) => void; - } - - /** Properties of a RetrieveInsightsRequest. */ - interface IRetrieveInsightsRequest { - - /** RetrieveInsightsRequest parent */ - parent?: (string|null); - - /** RetrieveInsightsRequest baseline */ - baseline?: (google.ads.datamanager.v1.IBaseline|null); - - /** RetrieveInsightsRequest userListId */ - userListId?: (string|null); - } - - /** Represents a RetrieveInsightsRequest. */ - class RetrieveInsightsRequest implements IRetrieveInsightsRequest { - - /** - * Constructs a new RetrieveInsightsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest); - - /** RetrieveInsightsRequest parent. */ - public parent: string; - - /** RetrieveInsightsRequest baseline. */ - public baseline?: (google.ads.datamanager.v1.IBaseline|null); - - /** RetrieveInsightsRequest userListId. */ - public userListId: string; - - /** - * Creates a new RetrieveInsightsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RetrieveInsightsRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest): google.ads.datamanager.v1.RetrieveInsightsRequest; - - /** - * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. - * @param message RetrieveInsightsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. - * @param message RetrieveInsightsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetrieveInsightsRequest - * @throws {Error} If the payload is not a 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.RetrieveInsightsRequest; - - /** - * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetrieveInsightsRequest - * @throws {Error} If the payload is 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.RetrieveInsightsRequest; - - /** - * Verifies a RetrieveInsightsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetrieveInsightsRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsRequest; - - /** - * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. - * @param message RetrieveInsightsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetrieveInsightsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetrieveInsightsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Baseline. */ - interface IBaseline { - - /** Baseline baselineLocation */ - baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); - - /** Baseline locationAutoDetectionEnabled */ - locationAutoDetectionEnabled?: (boolean|null); - } - - /** Represents a Baseline. */ - class Baseline implements IBaseline { - - /** - * Constructs a new Baseline. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IBaseline); - - /** Baseline baselineLocation. */ - public baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); - - /** Baseline locationAutoDetectionEnabled. */ - public locationAutoDetectionEnabled?: (boolean|null); - - /** Baseline baseline. */ - public baseline?: ("baselineLocation"|"locationAutoDetectionEnabled"); - - /** - * Creates a new Baseline instance using the specified properties. - * @param [properties] Properties to set - * @returns Baseline instance - */ - public static create(properties?: google.ads.datamanager.v1.IBaseline): google.ads.datamanager.v1.Baseline; - - /** - * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. - * @param message Baseline message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. - * @param message Baseline message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Baseline message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Baseline - * @throws {Error} If the payload is not a 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.Baseline; - - /** - * Decodes a Baseline message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Baseline - * @throws {Error} If the payload is 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.Baseline; - - /** - * Verifies a Baseline message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Baseline message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Baseline - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Baseline; - - /** - * Creates a plain object from a Baseline message. Also converts values to other types if specified. - * @param message Baseline - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.Baseline, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Baseline to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Baseline - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Baseline { - - /** Properties of a Location. */ - interface ILocation { - - /** Location regionCodes */ - regionCodes?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.Baseline.ILocation); - - /** Location regionCodes. */ - public regionCodes: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.ads.datamanager.v1.Baseline.ILocation): google.ads.datamanager.v1.Baseline.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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 RetrieveInsightsResponse. */ - interface IRetrieveInsightsResponse { - - /** RetrieveInsightsResponse marketingDataInsights */ - marketingDataInsights?: (google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]|null); - } - - /** Represents a RetrieveInsightsResponse. */ - class RetrieveInsightsResponse implements IRetrieveInsightsResponse { - - /** - * Constructs a new RetrieveInsightsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse); - - /** RetrieveInsightsResponse marketingDataInsights. */ - public marketingDataInsights: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]; - - /** - * Creates a new RetrieveInsightsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RetrieveInsightsResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse): google.ads.datamanager.v1.RetrieveInsightsResponse; - - /** - * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. - * @param message RetrieveInsightsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. - * @param message RetrieveInsightsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetrieveInsightsResponse - * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse; - - /** - * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetrieveInsightsResponse - * @throws {Error} If the payload is 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.RetrieveInsightsResponse; - - /** - * Verifies a RetrieveInsightsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetrieveInsightsResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse; - - /** - * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. - * @param message RetrieveInsightsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetrieveInsightsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetrieveInsightsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RetrieveInsightsResponse { - - /** Properties of a MarketingDataInsight. */ - interface IMarketingDataInsight { - - /** MarketingDataInsight dimension */ - dimension?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null); - - /** MarketingDataInsight attributes */ - attributes?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]|null); - } - - /** Represents a MarketingDataInsight. */ - class MarketingDataInsight implements IMarketingDataInsight { - - /** - * Constructs a new MarketingDataInsight. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight); - - /** MarketingDataInsight dimension. */ - public dimension: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension); - - /** MarketingDataInsight attributes. */ - public attributes: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]; - - /** - * Creates a new MarketingDataInsight instance using the specified properties. - * @param [properties] Properties to set - * @returns MarketingDataInsight instance - */ - public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; - - /** - * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. - * @param message MarketingDataInsight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. - * @param message MarketingDataInsight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MarketingDataInsight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MarketingDataInsight - * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight; - - /** - * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MarketingDataInsight - * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight; - - /** - * Verifies a MarketingDataInsight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MarketingDataInsight - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; - - /** - * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. - * @param message MarketingDataInsight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MarketingDataInsight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MarketingDataInsight - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MarketingDataInsight { - - /** AudienceInsightsDimension enum. */ - enum AudienceInsightsDimension { - AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED = 0, - AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN = 1, - AFFINITY_USER_INTEREST = 2, - IN_MARKET_USER_INTEREST = 3, - AGE_RANGE = 4, - GENDER = 5 - } - - /** Properties of a MarketingDataInsightsAttribute. */ - interface IMarketingDataInsightsAttribute { - - /** MarketingDataInsightsAttribute userInterestId */ - userInterestId?: (number|Long|string|null); - - /** MarketingDataInsightsAttribute lift */ - lift?: (number|null); - - /** MarketingDataInsightsAttribute ageRange */ - ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); - - /** MarketingDataInsightsAttribute gender */ - gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); - } - - /** Represents a MarketingDataInsightsAttribute. */ - class MarketingDataInsightsAttribute implements IMarketingDataInsightsAttribute { - - /** - * Constructs a new MarketingDataInsightsAttribute. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute); - - /** MarketingDataInsightsAttribute userInterestId. */ - public userInterestId?: (number|Long|string|null); - - /** MarketingDataInsightsAttribute lift. */ - public lift?: (number|null); - - /** MarketingDataInsightsAttribute ageRange. */ - public ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); - - /** MarketingDataInsightsAttribute gender. */ - public gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); - - /** - * Creates a new MarketingDataInsightsAttribute instance using the specified properties. - * @param [properties] Properties to set - * @returns MarketingDataInsightsAttribute instance - */ - public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; - - /** - * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. - * @param message MarketingDataInsightsAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. - * @param message MarketingDataInsightsAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MarketingDataInsightsAttribute - * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; - - /** - * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MarketingDataInsightsAttribute - * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; - - /** - * Verifies a MarketingDataInsightsAttribute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MarketingDataInsightsAttribute - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; - - /** - * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. - * @param message MarketingDataInsightsAttribute - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MarketingDataInsightsAttribute to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MarketingDataInsightsAttribute - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Represents a PartnerLinkService */ - class PartnerLinkService extends $protobuf.rpc.Service { - - /** - * Constructs a new PartnerLinkService 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 PartnerLinkService 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): PartnerLinkService; - - /** - * Calls CreatePartnerLink. - * @param request CreatePartnerLinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PartnerLink - */ - public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback): void; - - /** - * Calls CreatePartnerLink. - * @param request CreatePartnerLinkRequest message or plain object - * @returns Promise - */ - public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest): Promise; - - /** - * Calls DeletePartnerLink. - * @param request DeletePartnerLinkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback): void; - - /** - * Calls DeletePartnerLink. - * @param request DeletePartnerLinkRequest message or plain object - * @returns Promise - */ - public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest): Promise; - - /** - * Calls SearchPartnerLinks. - * @param request SearchPartnerLinksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse - */ - public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest, callback: google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback): void; - - /** - * Calls SearchPartnerLinks. - * @param request SearchPartnerLinksRequest message or plain object - * @returns Promise - */ - public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest): Promise; - } - - namespace PartnerLinkService { - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. - * @param error Error, if any - * @param [response] PartnerLink - */ - type CreatePartnerLinkCallback = (error: (Error|null), response?: google.ads.datamanager.v1.PartnerLink) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. - * @param error Error, if any - * @param [response] Empty - */ - type DeletePartnerLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. - * @param error Error, if any - * @param [response] SearchPartnerLinksResponse - */ - type SearchPartnerLinksCallback = (error: (Error|null), response?: google.ads.datamanager.v1.SearchPartnerLinksResponse) => void; - } - - /** Properties of a CreatePartnerLinkRequest. */ - interface ICreatePartnerLinkRequest { - - /** CreatePartnerLinkRequest parent */ - parent?: (string|null); - - /** CreatePartnerLinkRequest partnerLink */ - partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); - } - - /** Represents a CreatePartnerLinkRequest. */ - class CreatePartnerLinkRequest implements ICreatePartnerLinkRequest { - - /** - * Constructs a new CreatePartnerLinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest); - - /** CreatePartnerLinkRequest parent. */ - public parent: string; - - /** CreatePartnerLinkRequest partnerLink. */ - public partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); - - /** - * Creates a new CreatePartnerLinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePartnerLinkRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest): google.ads.datamanager.v1.CreatePartnerLinkRequest; - - /** - * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. - * @param message CreatePartnerLinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. - * @param message CreatePartnerLinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePartnerLinkRequest - * @throws {Error} If the payload is not a 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.CreatePartnerLinkRequest; - - /** - * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePartnerLinkRequest - * @throws {Error} If the payload is 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.CreatePartnerLinkRequest; - - /** - * Verifies a CreatePartnerLinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePartnerLinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreatePartnerLinkRequest; - - /** - * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. - * @param message CreatePartnerLinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.CreatePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePartnerLinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePartnerLinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePartnerLinkRequest. */ - interface IDeletePartnerLinkRequest { - - /** DeletePartnerLinkRequest name */ - name?: (string|null); - } - - /** Represents a DeletePartnerLinkRequest. */ - class DeletePartnerLinkRequest implements IDeletePartnerLinkRequest { - - /** - * Constructs a new DeletePartnerLinkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest); - - /** DeletePartnerLinkRequest name. */ - public name: string; - - /** - * Creates a new DeletePartnerLinkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePartnerLinkRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest): google.ads.datamanager.v1.DeletePartnerLinkRequest; - - /** - * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. - * @param message DeletePartnerLinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. - * @param message DeletePartnerLinkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePartnerLinkRequest - * @throws {Error} If the payload is not a 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.DeletePartnerLinkRequest; - - /** - * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePartnerLinkRequest - * @throws {Error} If the payload is 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.DeletePartnerLinkRequest; - - /** - * Verifies a DeletePartnerLinkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePartnerLinkRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeletePartnerLinkRequest; - - /** - * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. - * @param message DeletePartnerLinkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.DeletePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePartnerLinkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePartnerLinkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchPartnerLinksRequest. */ - interface ISearchPartnerLinksRequest { - - /** SearchPartnerLinksRequest parent */ - parent?: (string|null); - - /** SearchPartnerLinksRequest pageSize */ - pageSize?: (number|null); - - /** SearchPartnerLinksRequest pageToken */ - pageToken?: (string|null); - - /** SearchPartnerLinksRequest filter */ - filter?: (string|null); - } - - /** Represents a SearchPartnerLinksRequest. */ - class SearchPartnerLinksRequest implements ISearchPartnerLinksRequest { - - /** - * Constructs a new SearchPartnerLinksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest); - - /** SearchPartnerLinksRequest parent. */ - public parent: string; - - /** SearchPartnerLinksRequest pageSize. */ - public pageSize: number; - - /** SearchPartnerLinksRequest pageToken. */ - public pageToken: string; - - /** SearchPartnerLinksRequest filter. */ - public filter: string; - - /** - * Creates a new SearchPartnerLinksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchPartnerLinksRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest): google.ads.datamanager.v1.SearchPartnerLinksRequest; - - /** - * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. - * @param message SearchPartnerLinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. - * @param message SearchPartnerLinksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchPartnerLinksRequest - * @throws {Error} If the payload is not a 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.SearchPartnerLinksRequest; - - /** - * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchPartnerLinksRequest - * @throws {Error} If the payload is 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.SearchPartnerLinksRequest; - - /** - * Verifies a SearchPartnerLinksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchPartnerLinksRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksRequest; - - /** - * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. - * @param message SearchPartnerLinksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchPartnerLinksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchPartnerLinksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchPartnerLinksResponse. */ - interface ISearchPartnerLinksResponse { - - /** SearchPartnerLinksResponse partnerLinks */ - partnerLinks?: (google.ads.datamanager.v1.IPartnerLink[]|null); - - /** SearchPartnerLinksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a SearchPartnerLinksResponse. */ - class SearchPartnerLinksResponse implements ISearchPartnerLinksResponse { - - /** - * Constructs a new SearchPartnerLinksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse); - - /** SearchPartnerLinksResponse partnerLinks. */ - public partnerLinks: google.ads.datamanager.v1.IPartnerLink[]; - - /** SearchPartnerLinksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new SearchPartnerLinksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchPartnerLinksResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse): google.ads.datamanager.v1.SearchPartnerLinksResponse; - - /** - * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. - * @param message SearchPartnerLinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. - * @param message SearchPartnerLinksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchPartnerLinksResponse - * @throws {Error} If the payload is not a 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.SearchPartnerLinksResponse; - - /** - * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchPartnerLinksResponse - * @throws {Error} If the payload is 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.SearchPartnerLinksResponse; - - /** - * Verifies a SearchPartnerLinksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchPartnerLinksResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksResponse; - - /** - * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. - * @param message SearchPartnerLinksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchPartnerLinksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchPartnerLinksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PartnerLink. */ - interface IPartnerLink { - - /** PartnerLink name */ - name?: (string|null); - - /** PartnerLink partnerLinkId */ - partnerLinkId?: (string|null); - - /** PartnerLink owningAccount */ - owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); - - /** PartnerLink partnerAccount */ - partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); - } - - /** Represents a PartnerLink. */ - class PartnerLink implements IPartnerLink { - - /** - * Constructs a new PartnerLink. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IPartnerLink); - - /** PartnerLink name. */ - public name: string; - - /** PartnerLink partnerLinkId. */ - public partnerLinkId: string; - - /** PartnerLink owningAccount. */ - public owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); - - /** PartnerLink partnerAccount. */ - public partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); - - /** - * Creates a new PartnerLink instance using the specified properties. - * @param [properties] Properties to set - * @returns PartnerLink instance - */ - public static create(properties?: google.ads.datamanager.v1.IPartnerLink): google.ads.datamanager.v1.PartnerLink; - - /** - * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. - * @param message PartnerLink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. - * @param message PartnerLink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PartnerLink message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartnerLink - * @throws {Error} If the payload is not a 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.PartnerLink; - - /** - * Decodes a PartnerLink message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartnerLink - * @throws {Error} If the payload is 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.PartnerLink; - - /** - * Verifies a PartnerLink message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartnerLink - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerLink; - - /** - * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. - * @param message PartnerLink - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.PartnerLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartnerLink to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PartnerLink - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserList. */ - interface IUserList { - - /** UserList name */ - name?: (string|null); - - /** UserList id */ - id?: (number|Long|string|null); - - /** UserList readOnly */ - readOnly?: (boolean|null); - - /** UserList displayName */ - displayName?: (string|null); - - /** UserList description */ - description?: (string|null); - - /** UserList membershipStatus */ - membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); - - /** UserList integrationCode */ - integrationCode?: (string|null); - - /** UserList membershipDuration */ - membershipDuration?: (google.protobuf.IDuration|null); - - /** UserList closingReason */ - closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); - - /** UserList accessReason */ - accessReason?: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason|null); - - /** UserList accountAccessStatus */ - accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); - - /** UserList sizeInfo */ - sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); - - /** UserList targetNetworkInfo */ - targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); - - /** UserList ingestedUserListInfo */ - ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); - } - - /** Represents a UserList. */ - class UserList implements IUserList { - - /** - * Constructs a new UserList. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserList); - - /** UserList name. */ - public name: string; - - /** UserList id. */ - public id: (number|Long|string); - - /** UserList readOnly. */ - public readOnly: boolean; - - /** UserList displayName. */ - public displayName?: (string|null); - - /** UserList description. */ - public description?: (string|null); - - /** UserList membershipStatus. */ - public membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); - - /** UserList integrationCode. */ - public integrationCode?: (string|null); - - /** UserList membershipDuration. */ - public membershipDuration?: (google.protobuf.IDuration|null); - - /** UserList closingReason. */ - public closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); - - /** UserList accessReason. */ - public accessReason: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason); - - /** UserList accountAccessStatus. */ - public accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); - - /** UserList sizeInfo. */ - public sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); - - /** UserList targetNetworkInfo. */ - public targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); - - /** UserList ingestedUserListInfo. */ - public ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); - - /** UserList userListInfo. */ - public userListInfo?: "ingestedUserListInfo"; - - /** - * Creates a new UserList instance using the specified properties. - * @param [properties] Properties to set - * @returns UserList instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserList): google.ads.datamanager.v1.UserList; - - /** - * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. - * @param message UserList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. - * @param message UserList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserList - * @throws {Error} If the payload is not a 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.UserList; - - /** - * Decodes a UserList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserList - * @throws {Error} If the payload is 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.UserList; - - /** - * Verifies a UserList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserList - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserList; - - /** - * Creates a plain object from a UserList message. Also converts values to other types if specified. - * @param message UserList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UserList { - - /** MembershipStatus enum. */ - enum MembershipStatus { - MEMBERSHIP_STATUS_UNSPECIFIED = 0, - OPEN = 1, - CLOSED = 2 - } - - /** ClosingReason enum. */ - enum ClosingReason { - CLOSING_REASON_UNSPECIFIED = 0, - UNUSED = 1 - } - - /** AccessReason enum. */ - enum AccessReason { - ACCESS_REASON_UNSPECIFIED = 0, - OWNED = 1, - SHARED = 2, - LICENSED = 3, - SUBSCRIBED = 4, - AFFILIATED = 5 - } - - /** AccessStatus enum. */ - enum AccessStatus { - ACCESS_STATUS_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } - } - - /** Properties of a SizeInfo. */ - interface ISizeInfo { - - /** SizeInfo displayNetworkMembersCount */ - displayNetworkMembersCount?: (number|Long|string|null); - - /** SizeInfo searchNetworkMembersCount */ - searchNetworkMembersCount?: (number|Long|string|null); - } - - /** Represents a SizeInfo. */ - class SizeInfo implements ISizeInfo { - - /** - * Constructs a new SizeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ISizeInfo); - - /** SizeInfo displayNetworkMembersCount. */ - public displayNetworkMembersCount: (number|Long|string); - - /** SizeInfo searchNetworkMembersCount. */ - public searchNetworkMembersCount: (number|Long|string); - - /** - * Creates a new SizeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SizeInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.ISizeInfo): google.ads.datamanager.v1.SizeInfo; - - /** - * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. - * @param message SizeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. - * @param message SizeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SizeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SizeInfo - * @throws {Error} If the payload is not a 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.SizeInfo; - - /** - * Decodes a SizeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SizeInfo - * @throws {Error} If the payload is 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.SizeInfo; - - /** - * Verifies a SizeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SizeInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SizeInfo; - - /** - * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. - * @param message SizeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.SizeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SizeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SizeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetNetworkInfo. */ - interface ITargetNetworkInfo { - - /** TargetNetworkInfo eligibleForDisplay */ - eligibleForDisplay?: (boolean|null); - - /** TargetNetworkInfo eligibleForSearch */ - eligibleForSearch?: (boolean|null); - } - - /** Represents a TargetNetworkInfo. */ - class TargetNetworkInfo implements ITargetNetworkInfo { - - /** - * Constructs a new TargetNetworkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ITargetNetworkInfo); - - /** TargetNetworkInfo eligibleForDisplay. */ - public eligibleForDisplay: boolean; - - /** TargetNetworkInfo eligibleForSearch. */ - public eligibleForSearch?: (boolean|null); - - /** - * Creates a new TargetNetworkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetNetworkInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.ITargetNetworkInfo): google.ads.datamanager.v1.TargetNetworkInfo; - - /** - * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. - * @param message TargetNetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. - * @param message TargetNetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetNetworkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetNetworkInfo - * @throws {Error} If the payload is not a 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.TargetNetworkInfo; - - /** - * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetNetworkInfo - * @throws {Error} If the payload is 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.TargetNetworkInfo; - - /** - * Verifies a TargetNetworkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetNetworkInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.TargetNetworkInfo; - - /** - * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. - * @param message TargetNetworkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.TargetNetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetNetworkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetNetworkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IngestedUserListInfo. */ - interface IIngestedUserListInfo { - - /** IngestedUserListInfo uploadKeyTypes */ - uploadKeyTypes?: (google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]|null); - - /** IngestedUserListInfo contactIdInfo */ - contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); - - /** IngestedUserListInfo mobileIdInfo */ - mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); - - /** IngestedUserListInfo userIdInfo */ - userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); - - /** IngestedUserListInfo pairIdInfo */ - pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); - - /** IngestedUserListInfo pseudonymousIdInfo */ - pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); - - /** IngestedUserListInfo partnerAudienceInfo */ - partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); - } - - /** Represents an IngestedUserListInfo. */ - class IngestedUserListInfo implements IIngestedUserListInfo { - - /** - * Constructs a new IngestedUserListInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IIngestedUserListInfo); - - /** IngestedUserListInfo uploadKeyTypes. */ - public uploadKeyTypes: google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]; - - /** IngestedUserListInfo contactIdInfo. */ - public contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); - - /** IngestedUserListInfo mobileIdInfo. */ - public mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); - - /** IngestedUserListInfo userIdInfo. */ - public userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); - - /** IngestedUserListInfo pairIdInfo. */ - public pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); - - /** IngestedUserListInfo pseudonymousIdInfo. */ - public pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); - - /** IngestedUserListInfo partnerAudienceInfo. */ - public partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); - - /** - * Creates a new IngestedUserListInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns IngestedUserListInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IIngestedUserListInfo): google.ads.datamanager.v1.IngestedUserListInfo; - - /** - * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. - * @param message IngestedUserListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. - * @param message IngestedUserListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IngestedUserListInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IngestedUserListInfo - * @throws {Error} If the payload is not a 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.IngestedUserListInfo; - - /** - * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IngestedUserListInfo - * @throws {Error} If the payload is 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.IngestedUserListInfo; - - /** - * Verifies an IngestedUserListInfo message. - * @param message Plain 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 IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IngestedUserListInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestedUserListInfo; - - /** - * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. - * @param message IngestedUserListInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.IngestedUserListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IngestedUserListInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IngestedUserListInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IngestedUserListInfo { - - /** UploadKeyType enum. */ - enum UploadKeyType { - UPLOAD_KEY_TYPE_UNSPECIFIED = 0, - CONTACT_ID = 1, - MOBILE_ID = 2, - USER_ID = 3, - PAIR_ID = 4, - PSEUDONYMOUS_ID = 5 - } - } - - /** Properties of a ContactIdInfo. */ - interface IContactIdInfo { - - /** ContactIdInfo dataSourceType */ - dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - - /** ContactIdInfo matchRatePercentage */ - matchRatePercentage?: (number|null); - } - - /** Represents a ContactIdInfo. */ - class ContactIdInfo implements IContactIdInfo { - - /** - * Constructs a new ContactIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IContactIdInfo); - - /** ContactIdInfo dataSourceType. */ - public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - - /** ContactIdInfo matchRatePercentage. */ - public matchRatePercentage: number; - - /** - * Creates a new ContactIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ContactIdInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IContactIdInfo): google.ads.datamanager.v1.ContactIdInfo; - - /** - * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. - * @param message ContactIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. - * @param message ContactIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContactIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContactIdInfo - * @throws {Error} If the payload is not a 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.ContactIdInfo; - - /** - * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContactIdInfo - * @throws {Error} If the payload is 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.ContactIdInfo; - - /** - * Verifies a ContactIdInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContactIdInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ContactIdInfo; - - /** - * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. - * @param message ContactIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ContactIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContactIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContactIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MobileIdInfo. */ - interface IMobileIdInfo { - - /** MobileIdInfo dataSourceType */ - dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - - /** MobileIdInfo keySpace */ - keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); - - /** MobileIdInfo appId */ - appId?: (string|null); - } - - /** Represents a MobileIdInfo. */ - class MobileIdInfo implements IMobileIdInfo { - - /** - * Constructs a new MobileIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IMobileIdInfo); - - /** MobileIdInfo dataSourceType. */ - public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - - /** MobileIdInfo keySpace. */ - public keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); - - /** MobileIdInfo appId. */ - public appId?: (string|null); - - /** - * Creates a new MobileIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns MobileIdInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IMobileIdInfo): google.ads.datamanager.v1.MobileIdInfo; - - /** - * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. - * @param message MobileIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. - * @param message MobileIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MobileIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MobileIdInfo - * @throws {Error} If the payload is not a 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.MobileIdInfo; - - /** - * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MobileIdInfo - * @throws {Error} If the payload is 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.MobileIdInfo; - - /** - * Verifies a MobileIdInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MobileIdInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.MobileIdInfo; - - /** - * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. - * @param message MobileIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.MobileIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MobileIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MobileIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MobileIdInfo { - - /** KeySpace enum. */ - enum KeySpace { - KEY_SPACE_UNSPECIFIED = 0, - IOS = 1, - ANDROID = 2 - } - } - - /** Properties of a UserIdInfo. */ - interface IUserIdInfo { - - /** UserIdInfo dataSourceType */ - dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - } - - /** Represents a UserIdInfo. */ - class UserIdInfo implements IUserIdInfo { - - /** - * Constructs a new UserIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserIdInfo); - - /** UserIdInfo dataSourceType. */ - public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); - - /** - * Creates a new UserIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns UserIdInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserIdInfo): google.ads.datamanager.v1.UserIdInfo; - - /** - * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. - * @param message UserIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. - * @param message UserIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserIdInfo - * @throws {Error} If the payload is not a 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.UserIdInfo; - - /** - * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserIdInfo - * @throws {Error} If the payload is 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.UserIdInfo; - - /** - * Verifies a UserIdInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserIdInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdInfo; - - /** - * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. - * @param message UserIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PairIdInfo. */ - interface IPairIdInfo { - - /** PairIdInfo publisherId */ - publisherId?: (number|Long|string|null); - - /** PairIdInfo publisherName */ - publisherName?: (string|null); - - /** PairIdInfo matchRatePercentage */ - matchRatePercentage?: (number|null); - - /** PairIdInfo advertiserIdentifierCount */ - advertiserIdentifierCount?: (number|Long|string|null); - - /** PairIdInfo cleanRoomIdentifier */ - cleanRoomIdentifier?: (string|null); - } - - /** Represents a PairIdInfo. */ - class PairIdInfo implements IPairIdInfo { - - /** - * Constructs a new PairIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IPairIdInfo); - - /** PairIdInfo publisherId. */ - public publisherId?: (number|Long|string|null); - - /** PairIdInfo publisherName. */ - public publisherName?: (string|null); - - /** PairIdInfo matchRatePercentage. */ - public matchRatePercentage: number; - - /** PairIdInfo advertiserIdentifierCount. */ - public advertiserIdentifierCount: (number|Long|string); - - /** PairIdInfo cleanRoomIdentifier. */ - public cleanRoomIdentifier?: (string|null); - - /** - * Creates a new PairIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PairIdInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IPairIdInfo): google.ads.datamanager.v1.PairIdInfo; - - /** - * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. - * @param message PairIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. - * @param message PairIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PairIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PairIdInfo - * @throws {Error} If the payload is not a 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.PairIdInfo; - - /** - * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PairIdInfo - * @throws {Error} If the payload is 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.PairIdInfo; - - /** - * Verifies a PairIdInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PairIdInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PairIdInfo; - - /** - * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. - * @param message PairIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.PairIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PairIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PairIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PartnerAudienceInfo. */ - interface IPartnerAudienceInfo { - - /** PartnerAudienceInfo partnerAudienceSource */ - partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); - - /** PartnerAudienceInfo commercePartner */ - commercePartner?: (string|null); - } - - /** Represents a PartnerAudienceInfo. */ - class PartnerAudienceInfo implements IPartnerAudienceInfo { - - /** - * Constructs a new PartnerAudienceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo); - - /** PartnerAudienceInfo partnerAudienceSource. */ - public partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); - - /** PartnerAudienceInfo commercePartner. */ - public commercePartner?: (string|null); - - /** - * Creates a new PartnerAudienceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PartnerAudienceInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo): google.ads.datamanager.v1.PartnerAudienceInfo; - - /** - * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. - * @param message PartnerAudienceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. - * @param message PartnerAudienceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PartnerAudienceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartnerAudienceInfo - * @throws {Error} If the payload is not a 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.PartnerAudienceInfo; - - /** - * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartnerAudienceInfo - * @throws {Error} If the payload is 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.PartnerAudienceInfo; - - /** - * Verifies a PartnerAudienceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartnerAudienceInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerAudienceInfo; - - /** - * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. - * @param message PartnerAudienceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.PartnerAudienceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartnerAudienceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PartnerAudienceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PartnerAudienceInfo { - - /** PartnerAudienceSource enum. */ - enum PartnerAudienceSource { - PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0, - COMMERCE_AUDIENCE = 1, - LINEAR_TV_AUDIENCE = 2, - AGENCY_PROVIDER_AUDIENCE = 3 - } - } - - /** Properties of a PseudonymousIdInfo. */ - interface IPseudonymousIdInfo { - - /** PseudonymousIdInfo syncStatus */ - syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); - - /** PseudonymousIdInfo billableRecordCount */ - billableRecordCount?: (number|Long|string|null); - } - - /** Represents a PseudonymousIdInfo. */ - class PseudonymousIdInfo implements IPseudonymousIdInfo { - - /** - * Constructs a new PseudonymousIdInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo); - - /** PseudonymousIdInfo syncStatus. */ - public syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); - - /** PseudonymousIdInfo billableRecordCount. */ - public billableRecordCount?: (number|Long|string|null); - - /** - * Creates a new PseudonymousIdInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PseudonymousIdInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo): google.ads.datamanager.v1.PseudonymousIdInfo; - - /** - * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. - * @param message PseudonymousIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. - * @param message PseudonymousIdInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PseudonymousIdInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PseudonymousIdInfo - * @throws {Error} If the payload is not a 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.PseudonymousIdInfo; - - /** - * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PseudonymousIdInfo - * @throws {Error} If the payload is 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.PseudonymousIdInfo; - - /** - * Verifies a PseudonymousIdInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PseudonymousIdInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PseudonymousIdInfo; - - /** - * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. - * @param message PseudonymousIdInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.PseudonymousIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PseudonymousIdInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PseudonymousIdInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PseudonymousIdInfo { - - /** SyncStatus enum. */ - enum SyncStatus { - SYNC_STATUS_UNSPECIFIED = 0, - CREATED = 1, - READY_FOR_USE = 2, - FAILED = 3 - } - } - - /** DataSourceType enum. */ - enum DataSourceType { - DATA_SOURCE_TYPE_UNSPECIFIED = 0, - DATA_SOURCE_TYPE_FIRST_PARTY = 1, - DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU = 2, - DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE = 3, - DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA = 4 - } - - /** Properties of a UserListDirectLicense. */ - interface IUserListDirectLicense { - - /** UserListDirectLicense name */ - name?: (string|null); - - /** UserListDirectLicense userListId */ - userListId?: (number|Long|string|null); - - /** UserListDirectLicense userListDisplayName */ - userListDisplayName?: (string|null); - - /** UserListDirectLicense clientAccountType */ - clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); - - /** UserListDirectLicense clientAccountId */ - clientAccountId?: (number|Long|string|null); - - /** UserListDirectLicense clientAccountDisplayName */ - clientAccountDisplayName?: (string|null); - - /** UserListDirectLicense status */ - status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); - - /** UserListDirectLicense pricing */ - pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListDirectLicense historicalPricings */ - historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); - - /** UserListDirectLicense metrics */ - metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - } - - /** Represents a UserListDirectLicense. */ - class UserListDirectLicense implements IUserListDirectLicense { - - /** - * Constructs a new UserListDirectLicense. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserListDirectLicense); - - /** UserListDirectLicense name. */ - public name: string; - - /** UserListDirectLicense userListId. */ - public userListId?: (number|Long|string|null); - - /** UserListDirectLicense userListDisplayName. */ - public userListDisplayName: string; - - /** UserListDirectLicense clientAccountType. */ - public clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); - - /** UserListDirectLicense clientAccountId. */ - public clientAccountId?: (number|Long|string|null); - - /** UserListDirectLicense clientAccountDisplayName. */ - public clientAccountDisplayName: string; - - /** UserListDirectLicense status. */ - public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); - - /** UserListDirectLicense pricing. */ - public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListDirectLicense historicalPricings. */ - public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; - - /** UserListDirectLicense metrics. */ - public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - - /** - * Creates a new UserListDirectLicense instance using the specified properties. - * @param [properties] Properties to set - * @returns UserListDirectLicense instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserListDirectLicense): google.ads.datamanager.v1.UserListDirectLicense; - - /** - * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. - * @param message UserListDirectLicense message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. - * @param message UserListDirectLicense message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserListDirectLicense message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserListDirectLicense - * @throws {Error} If the payload is not a 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.UserListDirectLicense; - - /** - * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserListDirectLicense - * @throws {Error} If the payload is 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.UserListDirectLicense; - - /** - * Verifies a UserListDirectLicense message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserListDirectLicense - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListDirectLicense; - - /** - * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. - * @param message UserListDirectLicense - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserListDirectLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserListDirectLicense to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserListDirectLicense - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UserListLicenseClientAccountType enum. */ - enum UserListLicenseClientAccountType { - USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN = 0, - USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS = 1, - USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER = 2, - USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER = 3, - USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK = 4 - } - - /** Properties of a UserListLicenseMetrics. */ - interface IUserListLicenseMetrics { - - /** UserListLicenseMetrics clickCount */ - clickCount?: (number|Long|string|null); - - /** UserListLicenseMetrics impressionCount */ - impressionCount?: (number|Long|string|null); - - /** UserListLicenseMetrics revenueUsdMicros */ - revenueUsdMicros?: (number|Long|string|null); - - /** UserListLicenseMetrics startDate */ - startDate?: (number|Long|string|null); - - /** UserListLicenseMetrics endDate */ - endDate?: (number|Long|string|null); - } - - /** Represents a UserListLicenseMetrics. */ - class UserListLicenseMetrics implements IUserListLicenseMetrics { - - /** - * Constructs a new UserListLicenseMetrics. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics); - - /** UserListLicenseMetrics clickCount. */ - public clickCount: (number|Long|string); - - /** UserListLicenseMetrics impressionCount. */ - public impressionCount: (number|Long|string); - - /** UserListLicenseMetrics revenueUsdMicros. */ - public revenueUsdMicros: (number|Long|string); - - /** UserListLicenseMetrics startDate. */ - public startDate: (number|Long|string); - - /** UserListLicenseMetrics endDate. */ - public endDate: (number|Long|string); - - /** - * Creates a new UserListLicenseMetrics instance using the specified properties. - * @param [properties] Properties to set - * @returns UserListLicenseMetrics instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics): google.ads.datamanager.v1.UserListLicenseMetrics; - - /** - * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. - * @param message UserListLicenseMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. - * @param message UserListLicenseMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserListLicenseMetrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserListLicenseMetrics - * @throws {Error} If the payload is not a 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.UserListLicenseMetrics; - - /** - * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserListLicenseMetrics - * @throws {Error} If the payload is 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.UserListLicenseMetrics; - - /** - * Verifies a UserListLicenseMetrics message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserListLicenseMetrics - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicenseMetrics; - - /** - * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. - * @param message UserListLicenseMetrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserListLicenseMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserListLicenseMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserListLicenseMetrics - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserListLicensePricing. */ - interface IUserListLicensePricing { - - /** UserListLicensePricing pricingId */ - pricingId?: (number|Long|string|null); - - /** UserListLicensePricing costMicros */ - costMicros?: (number|Long|string|null); - - /** UserListLicensePricing currencyCode */ - currencyCode?: (string|null); - - /** UserListLicensePricing startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** UserListLicensePricing endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** UserListLicensePricing pricingActive */ - pricingActive?: (boolean|null); - - /** UserListLicensePricing buyerApprovalState */ - buyerApprovalState?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null); - - /** UserListLicensePricing costType */ - costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); - - /** UserListLicensePricing maxCostMicros */ - maxCostMicros?: (number|Long|string|null); - } - - /** Represents a UserListLicensePricing. */ - class UserListLicensePricing implements IUserListLicensePricing { - - /** - * Constructs a new UserListLicensePricing. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserListLicensePricing); - - /** UserListLicensePricing pricingId. */ - public pricingId: (number|Long|string); - - /** UserListLicensePricing costMicros. */ - public costMicros?: (number|Long|string|null); - - /** UserListLicensePricing currencyCode. */ - public currencyCode?: (string|null); - - /** UserListLicensePricing startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** UserListLicensePricing endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** UserListLicensePricing pricingActive. */ - public pricingActive: boolean; - - /** UserListLicensePricing buyerApprovalState. */ - public buyerApprovalState: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState); - - /** UserListLicensePricing costType. */ - public costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); - - /** UserListLicensePricing maxCostMicros. */ - public maxCostMicros?: (number|Long|string|null); - - /** - * Creates a new UserListLicensePricing instance using the specified properties. - * @param [properties] Properties to set - * @returns UserListLicensePricing instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserListLicensePricing): google.ads.datamanager.v1.UserListLicensePricing; - - /** - * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. - * @param message UserListLicensePricing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. - * @param message UserListLicensePricing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserListLicensePricing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserListLicensePricing - * @throws {Error} If the payload is not a 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.UserListLicensePricing; - - /** - * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserListLicensePricing - * @throws {Error} If the payload is 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.UserListLicensePricing; - - /** - * Verifies a UserListLicensePricing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserListLicensePricing - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicensePricing; - - /** - * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. - * @param message UserListLicensePricing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserListLicensePricing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserListLicensePricing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserListLicensePricing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UserListLicensePricing { - - /** UserListPricingBuyerApprovalState enum. */ - enum UserListPricingBuyerApprovalState { - USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED = 0, - PENDING = 1, - APPROVED = 2, - REJECTED = 3 - } - - /** UserListPricingCostType enum. */ - enum UserListPricingCostType { - USER_LIST_PRICING_COST_TYPE_UNSPECIFIED = 0, - CPC = 1, - CPM = 2, - MEDIA_SHARE = 3 - } - } - - /** UserListLicenseStatus enum. */ - enum UserListLicenseStatus { - USER_LIST_LICENSE_STATUS_UNSPECIFIED = 0, - USER_LIST_LICENSE_STATUS_ENABLED = 1, - USER_LIST_LICENSE_STATUS_DISABLED = 2 - } - - /** Represents a UserListDirectLicenseService */ - class UserListDirectLicenseService extends $protobuf.rpc.Service { - - /** - * Constructs a new UserListDirectLicenseService 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 UserListDirectLicenseService 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): UserListDirectLicenseService; - - /** - * Calls CreateUserListDirectLicense. - * @param request CreateUserListDirectLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListDirectLicense - */ - public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback): void; - - /** - * Calls CreateUserListDirectLicense. - * @param request CreateUserListDirectLicenseRequest message or plain object - * @returns Promise - */ - public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): Promise; - - /** - * Calls GetUserListDirectLicense. - * @param request GetUserListDirectLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListDirectLicense - */ - public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback): void; - - /** - * Calls GetUserListDirectLicense. - * @param request GetUserListDirectLicenseRequest message or plain object - * @returns Promise - */ - public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): Promise; - - /** - * Calls UpdateUserListDirectLicense. - * @param request UpdateUserListDirectLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListDirectLicense - */ - public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback): void; - - /** - * Calls UpdateUserListDirectLicense. - * @param request UpdateUserListDirectLicenseRequest message or plain object - * @returns Promise - */ - public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): Promise; - - /** - * Calls ListUserListDirectLicenses. - * @param request ListUserListDirectLicensesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse - */ - public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback): void; - - /** - * Calls ListUserListDirectLicenses. - * @param request ListUserListDirectLicensesRequest message or plain object - * @returns Promise - */ - public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): Promise; - } - - namespace UserListDirectLicenseService { - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. - * @param error Error, if any - * @param [response] UserListDirectLicense - */ - type CreateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. - * @param error Error, if any - * @param [response] UserListDirectLicense - */ - type GetUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. - * @param error Error, if any - * @param [response] UserListDirectLicense - */ - type UpdateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. - * @param error Error, if any - * @param [response] ListUserListDirectLicensesResponse - */ - type ListUserListDirectLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListDirectLicensesResponse) => void; - } - - /** Properties of a CreateUserListDirectLicenseRequest. */ - interface ICreateUserListDirectLicenseRequest { - - /** CreateUserListDirectLicenseRequest parent */ - parent?: (string|null); - - /** CreateUserListDirectLicenseRequest userListDirectLicense */ - userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); - } - - /** Represents a CreateUserListDirectLicenseRequest. */ - class CreateUserListDirectLicenseRequest implements ICreateUserListDirectLicenseRequest { - - /** - * Constructs a new CreateUserListDirectLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest); - - /** CreateUserListDirectLicenseRequest parent. */ - public parent: string; - - /** CreateUserListDirectLicenseRequest userListDirectLicense. */ - public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); - - /** - * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserListDirectLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; - - /** - * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. - * @param message CreateUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. - * @param message CreateUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a 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.CreateUserListDirectLicenseRequest; - - /** - * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserListDirectLicenseRequest - * @throws {Error} If the payload is 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.CreateUserListDirectLicenseRequest; - - /** - * Verifies a CreateUserListDirectLicenseRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserListDirectLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; - - /** - * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @param message CreateUserListDirectLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserListDirectLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserListDirectLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserListDirectLicenseRequest. */ - interface IGetUserListDirectLicenseRequest { - - /** GetUserListDirectLicenseRequest name */ - name?: (string|null); - } - - /** Represents a GetUserListDirectLicenseRequest. */ - class GetUserListDirectLicenseRequest implements IGetUserListDirectLicenseRequest { - - /** - * Constructs a new GetUserListDirectLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest); - - /** GetUserListDirectLicenseRequest name. */ - public name: string; - - /** - * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserListDirectLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; - - /** - * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. - * @param message GetUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. - * @param message GetUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserListDirectLicenseRequest - * @throws {Error} If the payload is not a 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.GetUserListDirectLicenseRequest; - - /** - * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserListDirectLicenseRequest - * @throws {Error} If the payload is 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.GetUserListDirectLicenseRequest; - - /** - * Verifies a GetUserListDirectLicenseRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserListDirectLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; - - /** - * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @param message GetUserListDirectLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.GetUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserListDirectLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserListDirectLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserListDirectLicenseRequest. */ - interface IUpdateUserListDirectLicenseRequest { - - /** UpdateUserListDirectLicenseRequest userListDirectLicense */ - userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); - - /** UpdateUserListDirectLicenseRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateUserListDirectLicenseRequest. */ - class UpdateUserListDirectLicenseRequest implements IUpdateUserListDirectLicenseRequest { - - /** - * Constructs a new UpdateUserListDirectLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest); - - /** UpdateUserListDirectLicenseRequest userListDirectLicense. */ - public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); - - /** UpdateUserListDirectLicenseRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserListDirectLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; - - /** - * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. - * @param message UpdateUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. - * @param message UpdateUserListDirectLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a 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.UpdateUserListDirectLicenseRequest; - - /** - * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserListDirectLicenseRequest - * @throws {Error} If the payload is 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.UpdateUserListDirectLicenseRequest; - - /** - * Verifies an UpdateUserListDirectLicenseRequest message. - * @param message Plain 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserListDirectLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; - - /** - * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @param message UpdateUserListDirectLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserListDirectLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserListDirectLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListDirectLicensesRequest. */ - interface IListUserListDirectLicensesRequest { - - /** ListUserListDirectLicensesRequest parent */ - parent?: (string|null); - - /** ListUserListDirectLicensesRequest filter */ - filter?: (string|null); - - /** ListUserListDirectLicensesRequest pageSize */ - pageSize?: (number|null); - - /** ListUserListDirectLicensesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserListDirectLicensesRequest. */ - class ListUserListDirectLicensesRequest implements IListUserListDirectLicensesRequest { - - /** - * Constructs a new ListUserListDirectLicensesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest); - - /** ListUserListDirectLicensesRequest parent. */ - public parent: string; - - /** ListUserListDirectLicensesRequest filter. */ - public filter: string; - - /** ListUserListDirectLicensesRequest pageSize. */ - public pageSize: number; - - /** ListUserListDirectLicensesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListDirectLicensesRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; - - /** - * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. - * @param message ListUserListDirectLicensesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. - * @param message ListUserListDirectLicensesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListDirectLicensesRequest - * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesRequest; - - /** - * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListDirectLicensesRequest - * @throws {Error} If the payload is 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.ListUserListDirectLicensesRequest; - - /** - * Verifies a ListUserListDirectLicensesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListDirectLicensesRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; - - /** - * Creates a plain object from a ListUserListDirectLicensesRequest message. Also converts values to other types if specified. - * @param message ListUserListDirectLicensesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListDirectLicensesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListDirectLicensesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListDirectLicensesResponse. */ - interface IListUserListDirectLicensesResponse { - - /** ListUserListDirectLicensesResponse userListDirectLicenses */ - userListDirectLicenses?: (google.ads.datamanager.v1.IUserListDirectLicense[]|null); - - /** ListUserListDirectLicensesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserListDirectLicensesResponse. */ - class ListUserListDirectLicensesResponse implements IListUserListDirectLicensesResponse { - - /** - * Constructs a new ListUserListDirectLicensesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse); - - /** ListUserListDirectLicensesResponse userListDirectLicenses. */ - public userListDirectLicenses: google.ads.datamanager.v1.IUserListDirectLicense[]; - - /** ListUserListDirectLicensesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListDirectLicensesResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; - - /** - * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. - * @param message ListUserListDirectLicensesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. - * @param message ListUserListDirectLicensesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListDirectLicensesResponse - * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesResponse; - - /** - * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListDirectLicensesResponse - * @throws {Error} If the payload is 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.ListUserListDirectLicensesResponse; - - /** - * Verifies a ListUserListDirectLicensesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListDirectLicensesResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; - - /** - * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. - * @param message ListUserListDirectLicensesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListDirectLicensesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListDirectLicensesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserListGlobalLicense. */ - interface IUserListGlobalLicense { - - /** UserListGlobalLicense name */ - name?: (string|null); - - /** UserListGlobalLicense userListId */ - userListId?: (number|Long|string|null); - - /** UserListGlobalLicense userListDisplayName */ - userListDisplayName?: (string|null); - - /** UserListGlobalLicense licenseType */ - licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); - - /** UserListGlobalLicense status */ - status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); - - /** UserListGlobalLicense pricing */ - pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListGlobalLicense historicalPricings */ - historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); - - /** UserListGlobalLicense metrics */ - metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - } - - /** Represents a UserListGlobalLicense. */ - class UserListGlobalLicense implements IUserListGlobalLicense { - - /** - * Constructs a new UserListGlobalLicense. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicense); - - /** UserListGlobalLicense name. */ - public name: string; - - /** UserListGlobalLicense userListId. */ - public userListId?: (number|Long|string|null); - - /** UserListGlobalLicense userListDisplayName. */ - public userListDisplayName: string; - - /** UserListGlobalLicense licenseType. */ - public licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); - - /** UserListGlobalLicense status. */ - public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); - - /** UserListGlobalLicense pricing. */ - public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListGlobalLicense historicalPricings. */ - public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; - - /** UserListGlobalLicense metrics. */ - public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - - /** - * Creates a new UserListGlobalLicense instance using the specified properties. - * @param [properties] Properties to set - * @returns UserListGlobalLicense instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicense): google.ads.datamanager.v1.UserListGlobalLicense; - - /** - * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. - * @param message UserListGlobalLicense message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. - * @param message UserListGlobalLicense message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserListGlobalLicense message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserListGlobalLicense - * @throws {Error} If the payload is not a 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.UserListGlobalLicense; - - /** - * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserListGlobalLicense - * @throws {Error} If the payload is 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.UserListGlobalLicense; - - /** - * Verifies a UserListGlobalLicense message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserListGlobalLicense - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicense; - - /** - * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. - * @param message UserListGlobalLicense - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserListGlobalLicense to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserListGlobalLicense - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserListGlobalLicenseCustomerInfo. */ - interface IUserListGlobalLicenseCustomerInfo { - - /** UserListGlobalLicenseCustomerInfo name */ - name?: (string|null); - - /** UserListGlobalLicenseCustomerInfo userListId */ - userListId?: (number|Long|string|null); - - /** UserListGlobalLicenseCustomerInfo userListDisplayName */ - userListDisplayName?: (string|null); - - /** UserListGlobalLicenseCustomerInfo licenseType */ - licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); - - /** UserListGlobalLicenseCustomerInfo status */ - status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); - - /** UserListGlobalLicenseCustomerInfo pricing */ - pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListGlobalLicenseCustomerInfo clientAccountType */ - clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); - - /** UserListGlobalLicenseCustomerInfo clientAccountId */ - clientAccountId?: (number|Long|string|null); - - /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName */ - clientAccountDisplayName?: (string|null); - - /** UserListGlobalLicenseCustomerInfo historicalPricings */ - historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); - - /** UserListGlobalLicenseCustomerInfo metrics */ - metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - } - - /** Represents a UserListGlobalLicenseCustomerInfo. */ - class UserListGlobalLicenseCustomerInfo implements IUserListGlobalLicenseCustomerInfo { - - /** - * Constructs a new UserListGlobalLicenseCustomerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo); - - /** UserListGlobalLicenseCustomerInfo name. */ - public name: string; - - /** UserListGlobalLicenseCustomerInfo userListId. */ - public userListId: (number|Long|string); - - /** UserListGlobalLicenseCustomerInfo userListDisplayName. */ - public userListDisplayName: string; - - /** UserListGlobalLicenseCustomerInfo licenseType. */ - public licenseType: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType); - - /** UserListGlobalLicenseCustomerInfo status. */ - public status: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus); - - /** UserListGlobalLicenseCustomerInfo pricing. */ - public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); - - /** UserListGlobalLicenseCustomerInfo clientAccountType. */ - public clientAccountType: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType); - - /** UserListGlobalLicenseCustomerInfo clientAccountId. */ - public clientAccountId: (number|Long|string); - - /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName. */ - public clientAccountDisplayName: string; - - /** UserListGlobalLicenseCustomerInfo historicalPricings. */ - public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; - - /** UserListGlobalLicenseCustomerInfo metrics. */ - public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); - - /** - * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns UserListGlobalLicenseCustomerInfo instance - */ - public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; - - /** - * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. - * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. - * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserListGlobalLicenseCustomerInfo - * @throws {Error} If the payload is not a 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.UserListGlobalLicenseCustomerInfo; - - /** - * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserListGlobalLicenseCustomerInfo - * @throws {Error} If the payload is 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.UserListGlobalLicenseCustomerInfo; - - /** - * Verifies a UserListGlobalLicenseCustomerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserListGlobalLicenseCustomerInfo - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; - - /** - * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. - * @param message UserListGlobalLicenseCustomerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserListGlobalLicenseCustomerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserListGlobalLicenseCustomerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** UserListGlobalLicenseType enum. */ - enum UserListGlobalLicenseType { - USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED = 0, - USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER = 1, - USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE = 2, - USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE = 3 - } - - /** Represents a UserListGlobalLicenseService */ - class UserListGlobalLicenseService extends $protobuf.rpc.Service { - - /** - * Constructs a new UserListGlobalLicenseService 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 UserListGlobalLicenseService 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): UserListGlobalLicenseService; - - /** - * Calls CreateUserListGlobalLicense. - * @param request CreateUserListGlobalLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense - */ - public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback): void; - - /** - * Calls CreateUserListGlobalLicense. - * @param request CreateUserListGlobalLicenseRequest message or plain object - * @returns Promise - */ - public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): Promise; - - /** - * Calls UpdateUserListGlobalLicense. - * @param request UpdateUserListGlobalLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense - */ - public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback): void; - - /** - * Calls UpdateUserListGlobalLicense. - * @param request UpdateUserListGlobalLicenseRequest message or plain object - * @returns Promise - */ - public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): Promise; - - /** - * Calls GetUserListGlobalLicense. - * @param request GetUserListGlobalLicenseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense - */ - public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback): void; - - /** - * Calls GetUserListGlobalLicense. - * @param request GetUserListGlobalLicenseRequest message or plain object - * @returns Promise - */ - public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): Promise; - - /** - * Calls ListUserListGlobalLicenses. - * @param request ListUserListGlobalLicensesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse - */ - public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback): void; - - /** - * Calls ListUserListGlobalLicenses. - * @param request ListUserListGlobalLicensesRequest message or plain object - * @returns Promise - */ - public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): Promise; - - /** - * Calls ListUserListGlobalLicenseCustomerInfos. - * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse - */ - public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback): void; - - /** - * Calls ListUserListGlobalLicenseCustomerInfos. - * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object - * @returns Promise - */ - public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): Promise; - } - - namespace UserListGlobalLicenseService { - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. - * @param error Error, if any - * @param [response] UserListGlobalLicense - */ - type CreateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. - * @param error Error, if any - * @param [response] UserListGlobalLicense - */ - type UpdateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. - * @param error Error, if any - * @param [response] UserListGlobalLicense - */ - type GetUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. - * @param error Error, if any - * @param [response] ListUserListGlobalLicensesResponse - */ - type ListUserListGlobalLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. - * @param error Error, if any - * @param [response] ListUserListGlobalLicenseCustomerInfosResponse - */ - type ListUserListGlobalLicenseCustomerInfosCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) => void; - } - - /** Properties of a CreateUserListGlobalLicenseRequest. */ - interface ICreateUserListGlobalLicenseRequest { - - /** CreateUserListGlobalLicenseRequest parent */ - parent?: (string|null); - - /** CreateUserListGlobalLicenseRequest userListGlobalLicense */ - userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); - } - - /** Represents a CreateUserListGlobalLicenseRequest. */ - class CreateUserListGlobalLicenseRequest implements ICreateUserListGlobalLicenseRequest { - - /** - * Constructs a new CreateUserListGlobalLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest); - - /** CreateUserListGlobalLicenseRequest parent. */ - public parent: string; - - /** CreateUserListGlobalLicenseRequest userListGlobalLicense. */ - public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); - - /** - * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserListGlobalLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; - - /** - * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. - * @param message CreateUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. - * @param message CreateUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a 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.CreateUserListGlobalLicenseRequest; - - /** - * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserListGlobalLicenseRequest - * @throws {Error} If the payload is 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.CreateUserListGlobalLicenseRequest; - - /** - * Verifies a CreateUserListGlobalLicenseRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserListGlobalLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; - - /** - * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @param message CreateUserListGlobalLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserListGlobalLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserListGlobalLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserListGlobalLicenseRequest. */ - interface IUpdateUserListGlobalLicenseRequest { - - /** UpdateUserListGlobalLicenseRequest userListGlobalLicense */ - userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); - - /** UpdateUserListGlobalLicenseRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateUserListGlobalLicenseRequest. */ - class UpdateUserListGlobalLicenseRequest implements IUpdateUserListGlobalLicenseRequest { - - /** - * Constructs a new UpdateUserListGlobalLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest); - - /** UpdateUserListGlobalLicenseRequest userListGlobalLicense. */ - public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); - - /** UpdateUserListGlobalLicenseRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserListGlobalLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; - - /** - * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. - * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. - * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a 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.UpdateUserListGlobalLicenseRequest; - - /** - * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserListGlobalLicenseRequest - * @throws {Error} If the payload is 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.UpdateUserListGlobalLicenseRequest; - - /** - * Verifies an UpdateUserListGlobalLicenseRequest message. - * @param message Plain 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserListGlobalLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; - - /** - * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @param message UpdateUserListGlobalLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserListGlobalLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserListGlobalLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserListGlobalLicenseRequest. */ - interface IGetUserListGlobalLicenseRequest { - - /** GetUserListGlobalLicenseRequest name */ - name?: (string|null); - } - - /** Represents a GetUserListGlobalLicenseRequest. */ - class GetUserListGlobalLicenseRequest implements IGetUserListGlobalLicenseRequest { - - /** - * Constructs a new GetUserListGlobalLicenseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest); - - /** GetUserListGlobalLicenseRequest name. */ - public name: string; - - /** - * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserListGlobalLicenseRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; - - /** - * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. - * @param message GetUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. - * @param message GetUserListGlobalLicenseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a 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.GetUserListGlobalLicenseRequest; - - /** - * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserListGlobalLicenseRequest - * @throws {Error} If the payload is 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.GetUserListGlobalLicenseRequest; - - /** - * Verifies a GetUserListGlobalLicenseRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserListGlobalLicenseRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; - - /** - * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @param message GetUserListGlobalLicenseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserListGlobalLicenseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserListGlobalLicenseRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListGlobalLicensesRequest. */ - interface IListUserListGlobalLicensesRequest { - - /** ListUserListGlobalLicensesRequest parent */ - parent?: (string|null); - - /** ListUserListGlobalLicensesRequest filter */ - filter?: (string|null); - - /** ListUserListGlobalLicensesRequest pageSize */ - pageSize?: (number|null); - - /** ListUserListGlobalLicensesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserListGlobalLicensesRequest. */ - class ListUserListGlobalLicensesRequest implements IListUserListGlobalLicensesRequest { - - /** - * Constructs a new ListUserListGlobalLicensesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest); - - /** ListUserListGlobalLicensesRequest parent. */ - public parent: string; - - /** ListUserListGlobalLicensesRequest filter. */ - public filter: string; - - /** ListUserListGlobalLicensesRequest pageSize. */ - public pageSize: number; - - /** ListUserListGlobalLicensesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListGlobalLicensesRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; - - /** - * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. - * @param message ListUserListGlobalLicensesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. - * @param message ListUserListGlobalLicensesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListGlobalLicensesRequest - * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesRequest; - - /** - * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListGlobalLicensesRequest - * @throws {Error} If the payload is 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.ListUserListGlobalLicensesRequest; - - /** - * Verifies a ListUserListGlobalLicensesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListGlobalLicensesRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; - - /** - * Creates a plain object from a ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. - * @param message ListUserListGlobalLicensesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListGlobalLicensesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListGlobalLicensesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListGlobalLicensesResponse. */ - interface IListUserListGlobalLicensesResponse { - - /** ListUserListGlobalLicensesResponse userListGlobalLicenses */ - userListGlobalLicenses?: (google.ads.datamanager.v1.IUserListGlobalLicense[]|null); - - /** ListUserListGlobalLicensesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserListGlobalLicensesResponse. */ - class ListUserListGlobalLicensesResponse implements IListUserListGlobalLicensesResponse { - - /** - * Constructs a new ListUserListGlobalLicensesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse); - - /** ListUserListGlobalLicensesResponse userListGlobalLicenses. */ - public userListGlobalLicenses: google.ads.datamanager.v1.IUserListGlobalLicense[]; - - /** ListUserListGlobalLicensesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListGlobalLicensesResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; - - /** - * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. - * @param message ListUserListGlobalLicensesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. - * @param message ListUserListGlobalLicensesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListGlobalLicensesResponse - * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesResponse; - - /** - * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListGlobalLicensesResponse - * @throws {Error} If the payload is 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.ListUserListGlobalLicensesResponse; - - /** - * Verifies a ListUserListGlobalLicensesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListGlobalLicensesResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; - - /** - * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. - * @param message ListUserListGlobalLicensesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListGlobalLicensesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListGlobalLicensesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListGlobalLicenseCustomerInfosRequest. */ - interface IListUserListGlobalLicenseCustomerInfosRequest { - - /** ListUserListGlobalLicenseCustomerInfosRequest parent */ - parent?: (string|null); - - /** ListUserListGlobalLicenseCustomerInfosRequest filter */ - filter?: (string|null); - - /** ListUserListGlobalLicenseCustomerInfosRequest pageSize */ - pageSize?: (number|null); - - /** ListUserListGlobalLicenseCustomerInfosRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserListGlobalLicenseCustomerInfosRequest. */ - class ListUserListGlobalLicenseCustomerInfosRequest implements IListUserListGlobalLicenseCustomerInfosRequest { - - /** - * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest); - - /** ListUserListGlobalLicenseCustomerInfosRequest parent. */ - public parent: string; - - /** ListUserListGlobalLicenseCustomerInfosRequest filter. */ - public filter: string; - - /** ListUserListGlobalLicenseCustomerInfosRequest pageSize. */ - public pageSize: number; - - /** ListUserListGlobalLicenseCustomerInfosRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListGlobalLicenseCustomerInfosRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. - * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. - * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListGlobalLicenseCustomerInfosRequest - * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosRequest; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListGlobalLicenseCustomerInfosRequest - * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosRequest; - - /** - * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListGlobalLicenseCustomerInfosRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; - - /** - * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. - * @param message ListUserListGlobalLicenseCustomerInfosRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListGlobalLicenseCustomerInfosResponse. */ - interface IListUserListGlobalLicenseCustomerInfosResponse { - - /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos */ - userListGlobalLicenseCustomerInfos?: (google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]|null); - - /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserListGlobalLicenseCustomerInfosResponse. */ - class ListUserListGlobalLicenseCustomerInfosResponse implements IListUserListGlobalLicenseCustomerInfosResponse { - - /** - * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse); - - /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. */ - public userListGlobalLicenseCustomerInfos: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]; - - /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListGlobalLicenseCustomerInfosResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. - * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. - * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListGlobalLicenseCustomerInfosResponse - * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosResponse; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListGlobalLicenseCustomerInfosResponse - * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosResponse; - - /** - * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListGlobalLicenseCustomerInfosResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; - - /** - * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. - * @param message ListUserListGlobalLicenseCustomerInfosResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a UserListService */ - class UserListService extends $protobuf.rpc.Service { - - /** - * Constructs a new UserListService 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 UserListService 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): UserListService; - - /** - * Calls GetUserList. - * @param request GetUserListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserList - */ - public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest, callback: google.ads.datamanager.v1.UserListService.GetUserListCallback): void; - - /** - * Calls GetUserList. - * @param request GetUserListRequest message or plain object - * @returns Promise - */ - public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest): Promise; - - /** - * Calls ListUserLists. - * @param request ListUserListsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserListsResponse - */ - public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest, callback: google.ads.datamanager.v1.UserListService.ListUserListsCallback): void; - - /** - * Calls ListUserLists. - * @param request ListUserListsRequest message or plain object - * @returns Promise - */ - public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest): Promise; - - /** - * Calls CreateUserList. - * @param request CreateUserListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserList - */ - public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest, callback: google.ads.datamanager.v1.UserListService.CreateUserListCallback): void; - - /** - * Calls CreateUserList. - * @param request CreateUserListRequest message or plain object - * @returns Promise - */ - public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest): Promise; - - /** - * Calls UpdateUserList. - * @param request UpdateUserListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserList - */ - public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest, callback: google.ads.datamanager.v1.UserListService.UpdateUserListCallback): void; - - /** - * Calls UpdateUserList. - * @param request UpdateUserListRequest message or plain object - * @returns Promise - */ - public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest): Promise; - - /** - * Calls DeleteUserList. - * @param request DeleteUserListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest, callback: google.ads.datamanager.v1.UserListService.DeleteUserListCallback): void; - - /** - * Calls DeleteUserList. - * @param request DeleteUserListRequest message or plain object - * @returns Promise - */ - public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest): Promise; - } - - namespace UserListService { - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. - * @param error Error, if any - * @param [response] UserList - */ - type GetUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. - * @param error Error, if any - * @param [response] ListUserListsResponse - */ - type ListUserListsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListsResponse) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. - * @param error Error, if any - * @param [response] UserList - */ - type CreateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. - * @param error Error, if any - * @param [response] UserList - */ - type UpdateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteUserListCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a GetUserListRequest. */ - interface IGetUserListRequest { - - /** GetUserListRequest name */ - name?: (string|null); - } - - /** Represents a GetUserListRequest. */ - class GetUserListRequest implements IGetUserListRequest { - - /** - * Constructs a new GetUserListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IGetUserListRequest); - - /** GetUserListRequest name. */ - public name: string; - - /** - * Creates a new GetUserListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserListRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IGetUserListRequest): google.ads.datamanager.v1.GetUserListRequest; - - /** - * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. - * @param message GetUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. - * @param message GetUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserListRequest - * @throws {Error} If the payload is not a 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.GetUserListRequest; - - /** - * Decodes a GetUserListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserListRequest - * @throws {Error} If the payload is 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.GetUserListRequest; - - /** - * Verifies a GetUserListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserListRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListRequest; - - /** - * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. - * @param message GetUserListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.GetUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListsRequest. */ - interface IListUserListsRequest { - - /** ListUserListsRequest parent */ - parent?: (string|null); - - /** ListUserListsRequest pageSize */ - pageSize?: (number|null); - - /** ListUserListsRequest pageToken */ - pageToken?: (string|null); - - /** ListUserListsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListUserListsRequest. */ - class ListUserListsRequest implements IListUserListsRequest { - - /** - * Constructs a new ListUserListsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListsRequest); - - /** ListUserListsRequest parent. */ - public parent: string; - - /** ListUserListsRequest pageSize. */ - public pageSize: number; - - /** ListUserListsRequest pageToken. */ - public pageToken: string; - - /** ListUserListsRequest filter. */ - public filter: string; - - /** - * Creates a new ListUserListsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListsRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListsRequest): google.ads.datamanager.v1.ListUserListsRequest; - - /** - * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. - * @param message ListUserListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. - * @param message ListUserListsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListsRequest - * @throws {Error} If the payload is not a 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.ListUserListsRequest; - - /** - * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListsRequest - * @throws {Error} If the payload is 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.ListUserListsRequest; - - /** - * Verifies a ListUserListsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListsRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsRequest; - - /** - * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. - * @param message ListUserListsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserListsResponse. */ - interface IListUserListsResponse { - - /** ListUserListsResponse userLists */ - userLists?: (google.ads.datamanager.v1.IUserList[]|null); - - /** ListUserListsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserListsResponse. */ - class ListUserListsResponse implements IListUserListsResponse { - - /** - * Constructs a new ListUserListsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IListUserListsResponse); - - /** ListUserListsResponse userLists. */ - public userLists: google.ads.datamanager.v1.IUserList[]; - - /** ListUserListsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserListsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserListsResponse instance - */ - public static create(properties?: google.ads.datamanager.v1.IListUserListsResponse): google.ads.datamanager.v1.ListUserListsResponse; - - /** - * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. - * @param message ListUserListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. - * @param message ListUserListsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserListsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserListsResponse - * @throws {Error} If the payload is not a 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.ListUserListsResponse; - - /** - * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserListsResponse - * @throws {Error} If the payload is 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.ListUserListsResponse; - - /** - * Verifies a ListUserListsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserListsResponse - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsResponse; - - /** - * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. - * @param message ListUserListsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.ListUserListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserListsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserListsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserListRequest. */ - interface ICreateUserListRequest { - - /** CreateUserListRequest parent */ - parent?: (string|null); - - /** CreateUserListRequest userList */ - userList?: (google.ads.datamanager.v1.IUserList|null); - - /** CreateUserListRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateUserListRequest. */ - class CreateUserListRequest implements ICreateUserListRequest { - - /** - * Constructs a new CreateUserListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ICreateUserListRequest); - - /** CreateUserListRequest parent. */ - public parent: string; - - /** CreateUserListRequest userList. */ - public userList?: (google.ads.datamanager.v1.IUserList|null); - - /** CreateUserListRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateUserListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserListRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.ICreateUserListRequest): google.ads.datamanager.v1.CreateUserListRequest; - - /** - * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. - * @param message CreateUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. - * @param message CreateUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserListRequest - * @throws {Error} If the payload is not a 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.CreateUserListRequest; - - /** - * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserListRequest - * @throws {Error} If the payload is 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.CreateUserListRequest; - - /** - * Verifies a CreateUserListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserListRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListRequest; - - /** - * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. - * @param message CreateUserListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.CreateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserListRequest. */ - interface IUpdateUserListRequest { - - /** UpdateUserListRequest userList */ - userList?: (google.ads.datamanager.v1.IUserList|null); - - /** UpdateUserListRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateUserListRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateUserListRequest. */ - class UpdateUserListRequest implements IUpdateUserListRequest { - - /** - * Constructs a new UpdateUserListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IUpdateUserListRequest); - - /** UpdateUserListRequest userList. */ - public userList?: (google.ads.datamanager.v1.IUserList|null); - - /** UpdateUserListRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateUserListRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateUserListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserListRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IUpdateUserListRequest): google.ads.datamanager.v1.UpdateUserListRequest; - - /** - * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. - * @param message UpdateUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IUpdateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. - * @param message UpdateUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserListRequest - * @throws {Error} If the payload is not a 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.UpdateUserListRequest; - - /** - * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserListRequest - * @throws {Error} If the payload is 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.UpdateUserListRequest; - - /** - * Verifies an UpdateUserListRequest message. - * @param message Plain 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 UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserListRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListRequest; - - /** - * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. - * @param message UpdateUserListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.UpdateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserListRequest. */ - interface IDeleteUserListRequest { - - /** DeleteUserListRequest name */ - name?: (string|null); - - /** DeleteUserListRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a DeleteUserListRequest. */ - class DeleteUserListRequest implements IDeleteUserListRequest { - - /** - * Constructs a new DeleteUserListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IDeleteUserListRequest); - - /** DeleteUserListRequest name. */ - public name: string; - - /** DeleteUserListRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new DeleteUserListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserListRequest instance - */ - public static create(properties?: google.ads.datamanager.v1.IDeleteUserListRequest): google.ads.datamanager.v1.DeleteUserListRequest; - - /** - * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. - * @param message DeleteUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.ads.datamanager.v1.IDeleteUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. - * @param message DeleteUserListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.ads.datamanager.v1.IDeleteUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserListRequest - * @throws {Error} If the payload is not a 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.DeleteUserListRequest; - - /** - * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserListRequest - * @throws {Error} If the payload is 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.DeleteUserListRequest; - - /** - * Verifies a DeleteUserListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserListRequest - */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeleteUserListRequest; - - /** - * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. - * @param message DeleteUserListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.ads.datamanager.v1.DeleteUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserListRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** 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 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; - } - - /** 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); - - /** 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); - } - - /** 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; - } - - /** 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 FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-ads-datamanager/protos/protos.js b/owl-bot-staging/google-ads-datamanager/protos/protos.js deleted file mode 100644 index 0dfae3dfbd5..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/protos.js +++ /dev/null @@ -1,48872 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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_ads_datamanager_protos || ($protobuf.roots._google_ads_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 = {}; - - /** - * AgeRange enum. - * @name google.ads.datamanager.v1.AgeRange - * @enum {number} - * @property {number} AGE_RANGE_UNSPECIFIED=0 AGE_RANGE_UNSPECIFIED value - * @property {number} AGE_RANGE_UNKNOWN=1 AGE_RANGE_UNKNOWN value - * @property {number} AGE_RANGE_18_24=2 AGE_RANGE_18_24 value - * @property {number} AGE_RANGE_25_34=3 AGE_RANGE_25_34 value - * @property {number} AGE_RANGE_35_44=4 AGE_RANGE_35_44 value - * @property {number} AGE_RANGE_45_54=5 AGE_RANGE_45_54 value - * @property {number} AGE_RANGE_55_64=6 AGE_RANGE_55_64 value - * @property {number} AGE_RANGE_65_UP=7 AGE_RANGE_65_UP value - */ - v1.AgeRange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AGE_RANGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AGE_RANGE_UNKNOWN"] = 1; - values[valuesById[2] = "AGE_RANGE_18_24"] = 2; - values[valuesById[3] = "AGE_RANGE_25_34"] = 3; - values[valuesById[4] = "AGE_RANGE_35_44"] = 4; - values[valuesById[5] = "AGE_RANGE_45_54"] = 5; - values[valuesById[6] = "AGE_RANGE_55_64"] = 6; - values[valuesById[7] = "AGE_RANGE_65_UP"] = 7; - return values; - })(); - - 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.IUserIdData|null} [userIdData] AudienceMember userIdData - * @property {google.ads.datamanager.v1.IPpidData|null} [ppidData] AudienceMember ppidData - * @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 userIdData. - * @member {google.ads.datamanager.v1.IUserIdData|null|undefined} userIdData - * @memberof google.ads.datamanager.v1.AudienceMember - * @instance - */ - AudienceMember.prototype.userIdData = null; - - /** - * AudienceMember ppidData. - * @member {google.ads.datamanager.v1.IPpidData|null|undefined} ppidData - * @memberof google.ads.datamanager.v1.AudienceMember - * @instance - */ - AudienceMember.prototype.ppidData = 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"|"userIdData"|"ppidData"|undefined} data - * @memberof google.ads.datamanager.v1.AudienceMember - * @instance - */ - Object.defineProperty(AudienceMember.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["userData", "pairData", "mobileData", "userIdData", "ppidData"]), - 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(); - if (message.userIdData != null && Object.hasOwnProperty.call(message, "userIdData")) - $root.google.ads.datamanager.v1.UserIdData.encode(message.userIdData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.ppidData != null && Object.hasOwnProperty.call(message, "ppidData")) - $root.google.ads.datamanager.v1.PpidData.encode(message.ppidData, writer.uint32(/* id 7, wireType 2 =*/58).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 6: { - message.userIdData = $root.google.ads.datamanager.v1.UserIdData.decode(reader, reader.uint32()); - break; - } - case 7: { - message.ppidData = $root.google.ads.datamanager.v1.PpidData.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.userIdData != null && message.hasOwnProperty("userIdData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.ads.datamanager.v1.UserIdData.verify(message.userIdData); - if (error) - return "userIdData." + error; - } - } - if (message.ppidData != null && message.hasOwnProperty("ppidData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.ads.datamanager.v1.PpidData.verify(message.ppidData); - if (error) - return "ppidData." + 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.userIdData != null) { - if (typeof object.userIdData !== "object") - throw TypeError(".google.ads.datamanager.v1.AudienceMember.userIdData: object expected"); - message.userIdData = $root.google.ads.datamanager.v1.UserIdData.fromObject(object.userIdData); - } - if (object.ppidData != null) { - if (typeof object.ppidData !== "object") - throw TypeError(".google.ads.datamanager.v1.AudienceMember.ppidData: object expected"); - message.ppidData = $root.google.ads.datamanager.v1.PpidData.fromObject(object.ppidData); - } - 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"; - } - if (message.userIdData != null && message.hasOwnProperty("userIdData")) { - object.userIdData = $root.google.ads.datamanager.v1.UserIdData.toObject(message.userIdData, options); - if (options.oneofs) - object.data = "userIdData"; - } - if (message.ppidData != null && message.hasOwnProperty("ppidData")) { - object.ppidData = $root.google.ads.datamanager.v1.PpidData.toObject(message.ppidData, options); - if (options.oneofs) - object.data = "ppidData"; - } - 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.UserIdData = (function() { - - /** - * Properties of a UserIdData. - * @memberof google.ads.datamanager.v1 - * @interface IUserIdData - * @property {string|null} [userId] UserIdData userId - */ - - /** - * Constructs a new UserIdData. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserIdData. - * @implements IUserIdData - * @constructor - * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set - */ - function UserIdData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserIdData userId. - * @member {string} userId - * @memberof google.ads.datamanager.v1.UserIdData - * @instance - */ - UserIdData.prototype.userId = ""; - - /** - * Creates a new UserIdData instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserIdData} UserIdData instance - */ - UserIdData.create = function create(properties) { - return new UserIdData(properties); - }; - - /** - * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserIdData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); - return writer; - }; - - /** - * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserIdData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserIdData message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserIdData - * @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.UserIdData} UserIdData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserIdData.decode = function decode(reader, 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.UserIdData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserIdData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserIdData} UserIdData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserIdData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserIdData message. - * @function verify - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserIdData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - return null; - }; - - /** - * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserIdData} UserIdData - */ - UserIdData.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserIdData) - return object; - var message = new $root.google.ads.datamanager.v1.UserIdData(); - if (object.userId != null) - message.userId = String(object.userId); - return message; - }; - - /** - * Creates a plain object from a UserIdData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {google.ads.datamanager.v1.UserIdData} message UserIdData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserIdData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.userId = ""; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - return object; - }; - - /** - * Converts this UserIdData to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserIdData - * @instance - * @returns {Object.} JSON object - */ - UserIdData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserIdData - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserIdData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserIdData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdData"; - }; - - return UserIdData; - })(); - - v1.PpidData = (function() { - - /** - * Properties of a PpidData. - * @memberof google.ads.datamanager.v1 - * @interface IPpidData - * @property {Array.|null} [ppids] PpidData ppids - */ - - /** - * Constructs a new PpidData. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PpidData. - * @implements IPpidData - * @constructor - * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set - */ - function PpidData(properties) { - this.ppids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PpidData ppids. - * @member {Array.} ppids - * @memberof google.ads.datamanager.v1.PpidData - * @instance - */ - PpidData.prototype.ppids = $util.emptyArray; - - /** - * Creates a new PpidData instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.PpidData} PpidData instance - */ - PpidData.create = function create(properties) { - return new PpidData(properties); - }; - - /** - * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PpidData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ppids != null && message.ppids.length) - for (var i = 0; i < message.ppids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ppids[i]); - return writer; - }; - - /** - * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PpidData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PpidData message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.PpidData - * @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.PpidData} PpidData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PpidData.decode = function decode(reader, 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.PpidData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.ppids && message.ppids.length)) - message.ppids = []; - message.ppids.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PpidData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.PpidData} PpidData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PpidData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PpidData message. - * @function verify - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PpidData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ppids != null && message.hasOwnProperty("ppids")) { - if (!Array.isArray(message.ppids)) - return "ppids: array expected"; - for (var i = 0; i < message.ppids.length; ++i) - if (!$util.isString(message.ppids[i])) - return "ppids: string[] expected"; - } - return null; - }; - - /** - * Creates a PpidData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.PpidData} PpidData - */ - PpidData.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.PpidData) - return object; - var message = new $root.google.ads.datamanager.v1.PpidData(); - if (object.ppids) { - if (!Array.isArray(object.ppids)) - throw TypeError(".google.ads.datamanager.v1.PpidData.ppids: array expected"); - message.ppids = []; - for (var i = 0; i < object.ppids.length; ++i) - message.ppids[i] = String(object.ppids[i]); - } - return message; - }; - - /** - * Creates a plain object from a PpidData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {google.ads.datamanager.v1.PpidData} message PpidData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PpidData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ppids = []; - if (message.ppids && message.ppids.length) { - object.ppids = []; - for (var j = 0; j < message.ppids.length; ++j) - object.ppids[j] = message.ppids[j]; - } - return object; - }; - - /** - * Converts this PpidData to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.PpidData - * @instance - * @returns {Object.} JSON object - */ - PpidData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PpidData - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.PpidData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PpidData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.PpidData"; - }; - - return PpidData; - })(); - - 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 - * @property {string|null} [itemId] Item itemId - * @property {Array.|null} [additionalItemParameters] Item additionalItemParameters - */ - - /** - * 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) { - this.additionalItemParameters = []; - if (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; - - /** - * Item itemId. - * @member {string} itemId - * @memberof google.ads.datamanager.v1.Item - * @instance - */ - Item.prototype.itemId = ""; - - /** - * Item additionalItemParameters. - * @member {Array.} additionalItemParameters - * @memberof google.ads.datamanager.v1.Item - * @instance - */ - Item.prototype.additionalItemParameters = $util.emptyArray; - - /** - * 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); - if (message.itemId != null && Object.hasOwnProperty.call(message, "itemId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.itemId); - if (message.additionalItemParameters != null && message.additionalItemParameters.length) - for (var i = 0; i < message.additionalItemParameters.length; ++i) - $root.google.ads.datamanager.v1.ItemParameter.encode(message.additionalItemParameters[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - 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; - } - case 4: { - message.itemId = reader.string(); - break; - } - case 5: { - if (!(message.additionalItemParameters && message.additionalItemParameters.length)) - message.additionalItemParameters = []; - message.additionalItemParameters.push($root.google.ads.datamanager.v1.ItemParameter.decode(reader, reader.uint32())); - 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"; - if (message.itemId != null && message.hasOwnProperty("itemId")) - if (!$util.isString(message.itemId)) - return "itemId: string expected"; - if (message.additionalItemParameters != null && message.hasOwnProperty("additionalItemParameters")) { - if (!Array.isArray(message.additionalItemParameters)) - return "additionalItemParameters: array expected"; - for (var i = 0; i < message.additionalItemParameters.length; ++i) { - var error = $root.google.ads.datamanager.v1.ItemParameter.verify(message.additionalItemParameters[i]); - if (error) - return "additionalItemParameters." + error; - } - } - 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); - if (object.itemId != null) - message.itemId = String(object.itemId); - if (object.additionalItemParameters) { - if (!Array.isArray(object.additionalItemParameters)) - throw TypeError(".google.ads.datamanager.v1.Item.additionalItemParameters: array expected"); - message.additionalItemParameters = []; - for (var i = 0; i < object.additionalItemParameters.length; ++i) { - if (typeof object.additionalItemParameters[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.Item.additionalItemParameters: object expected"); - message.additionalItemParameters[i] = $root.google.ads.datamanager.v1.ItemParameter.fromObject(object.additionalItemParameters[i]); - } - } - 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.arrays || options.defaults) - object.additionalItemParameters = []; - 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; - object.itemId = ""; - } - 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; - if (message.itemId != null && message.hasOwnProperty("itemId")) - object.itemId = message.itemId; - if (message.additionalItemParameters && message.additionalItemParameters.length) { - object.additionalItemParameters = []; - for (var j = 0; j < message.additionalItemParameters.length; ++j) - object.additionalItemParameters[j] = $root.google.ads.datamanager.v1.ItemParameter.toObject(message.additionalItemParameters[j], options); - } - 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.ItemParameter = (function() { - - /** - * Properties of an ItemParameter. - * @memberof google.ads.datamanager.v1 - * @interface IItemParameter - * @property {string|null} [parameterName] ItemParameter parameterName - * @property {string|null} [value] ItemParameter value - */ - - /** - * Constructs a new ItemParameter. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an ItemParameter. - * @implements IItemParameter - * @constructor - * @param {google.ads.datamanager.v1.IItemParameter=} [properties] Properties to set - */ - function ItemParameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ItemParameter parameterName. - * @member {string} parameterName - * @memberof google.ads.datamanager.v1.ItemParameter - * @instance - */ - ItemParameter.prototype.parameterName = ""; - - /** - * ItemParameter value. - * @member {string} value - * @memberof google.ads.datamanager.v1.ItemParameter - * @instance - */ - ItemParameter.prototype.value = ""; - - /** - * Creates a new ItemParameter instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {google.ads.datamanager.v1.IItemParameter=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter instance - */ - ItemParameter.create = function create(properties) { - return new ItemParameter(properties); - }; - - /** - * Encodes the specified ItemParameter message. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {google.ads.datamanager.v1.IItemParameter} message ItemParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ItemParameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameterName); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified ItemParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ItemParameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {google.ads.datamanager.v1.IItemParameter} message ItemParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ItemParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ItemParameter message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ItemParameter - * @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.ItemParameter} ItemParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ItemParameter.decode = function decode(reader, 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.ItemParameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parameterName = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ItemParameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ItemParameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ItemParameter message. - * @function verify - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ItemParameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - if (!$util.isString(message.parameterName)) - return "parameterName: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an ItemParameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ItemParameter} ItemParameter - */ - ItemParameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ItemParameter) - return object; - var message = new $root.google.ads.datamanager.v1.ItemParameter(); - if (object.parameterName != null) - message.parameterName = String(object.parameterName); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an ItemParameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {google.ads.datamanager.v1.ItemParameter} message ItemParameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ItemParameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameterName = ""; - object.value = ""; - } - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - object.parameterName = message.parameterName; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this ItemParameter to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ItemParameter - * @instance - * @returns {Object.} JSON object - */ - ItemParameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ItemParameter - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ItemParameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ItemParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ItemParameter"; - }; - - return ItemParameter; - })(); - - 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: - case 5: - case 6: - 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; - case "GOOGLE_ANALYTICS_PROPERTY": - case 5: - message.accountType = 5; - break; - case "GOOGLE_AD_MANAGER_AUDIENCE_LINK": - case 6: - message.accountType = 6; - 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 - * @property {number} GOOGLE_ANALYTICS_PROPERTY=5 GOOGLE_ANALYTICS_PROPERTY value - * @property {number} GOOGLE_AD_MANAGER_AUDIENCE_LINK=6 GOOGLE_AD_MANAGER_AUDIENCE_LINK 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; - values[valuesById[5] = "GOOGLE_ANALYTICS_PROPERTY"] = 5; - values[valuesById[6] = "GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 6; - 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 - * @property {google.ads.datamanager.v1.IAwsWrappedKeyInfo|null} [awsWrappedKeyInfo] EncryptionInfo awsWrappedKeyInfo - */ - - /** - * 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; - - /** - * EncryptionInfo awsWrappedKeyInfo. - * @member {google.ads.datamanager.v1.IAwsWrappedKeyInfo|null|undefined} awsWrappedKeyInfo - * @memberof google.ads.datamanager.v1.EncryptionInfo - * @instance - */ - EncryptionInfo.prototype.awsWrappedKeyInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * EncryptionInfo wrappedKey. - * @member {"gcpWrappedKeyInfo"|"awsWrappedKeyInfo"|undefined} wrappedKey - * @memberof google.ads.datamanager.v1.EncryptionInfo - * @instance - */ - Object.defineProperty(EncryptionInfo.prototype, "wrappedKey", { - get: $util.oneOfGetter($oneOfFields = ["gcpWrappedKeyInfo", "awsWrappedKeyInfo"]), - 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(); - if (message.awsWrappedKeyInfo != null && Object.hasOwnProperty.call(message, "awsWrappedKeyInfo")) - $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.encode(message.awsWrappedKeyInfo, writer.uint32(/* id 2, wireType 2 =*/18).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; - } - case 2: { - message.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.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; - } - } - if (message.awsWrappedKeyInfo != null && message.hasOwnProperty("awsWrappedKeyInfo")) { - if (properties.wrappedKey === 1) - return "wrappedKey: multiple values"; - properties.wrappedKey = 1; - { - var error = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.verify(message.awsWrappedKeyInfo); - if (error) - return "awsWrappedKeyInfo." + 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); - } - if (object.awsWrappedKeyInfo != null) { - if (typeof object.awsWrappedKeyInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.EncryptionInfo.awsWrappedKeyInfo: object expected"); - message.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.fromObject(object.awsWrappedKeyInfo); - } - 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"; - } - if (message.awsWrappedKeyInfo != null && message.hasOwnProperty("awsWrappedKeyInfo")) { - object.awsWrappedKeyInfo = $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.toObject(message.awsWrappedKeyInfo, options); - if (options.oneofs) - object.wrappedKey = "awsWrappedKeyInfo"; - } - 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; - })(); - - v1.AwsWrappedKeyInfo = (function() { - - /** - * Properties of an AwsWrappedKeyInfo. - * @memberof google.ads.datamanager.v1 - * @interface IAwsWrappedKeyInfo - * @property {google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType|null} [keyType] AwsWrappedKeyInfo keyType - * @property {string|null} [roleArn] AwsWrappedKeyInfo roleArn - * @property {string|null} [kekUri] AwsWrappedKeyInfo kekUri - * @property {string|null} [encryptedDek] AwsWrappedKeyInfo encryptedDek - */ - - /** - * Constructs a new AwsWrappedKeyInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an AwsWrappedKeyInfo. - * @implements IAwsWrappedKeyInfo - * @constructor - * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo=} [properties] Properties to set - */ - function AwsWrappedKeyInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AwsWrappedKeyInfo keyType. - * @member {google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType} keyType - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @instance - */ - AwsWrappedKeyInfo.prototype.keyType = 0; - - /** - * AwsWrappedKeyInfo roleArn. - * @member {string} roleArn - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @instance - */ - AwsWrappedKeyInfo.prototype.roleArn = ""; - - /** - * AwsWrappedKeyInfo kekUri. - * @member {string} kekUri - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @instance - */ - AwsWrappedKeyInfo.prototype.kekUri = ""; - - /** - * AwsWrappedKeyInfo encryptedDek. - * @member {string} encryptedDek - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @instance - */ - AwsWrappedKeyInfo.prototype.encryptedDek = ""; - - /** - * Creates a new AwsWrappedKeyInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo instance - */ - AwsWrappedKeyInfo.create = function create(properties) { - return new AwsWrappedKeyInfo(properties); - }; - - /** - * Encodes the specified AwsWrappedKeyInfo message. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo} message AwsWrappedKeyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsWrappedKeyInfo.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.roleArn != null && Object.hasOwnProperty.call(message, "roleArn")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.roleArn); - 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 AwsWrappedKeyInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.AwsWrappedKeyInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {google.ads.datamanager.v1.IAwsWrappedKeyInfo} message AwsWrappedKeyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsWrappedKeyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AwsWrappedKeyInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @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.AwsWrappedKeyInfo} AwsWrappedKeyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsWrappedKeyInfo.decode = function decode(reader, 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.AwsWrappedKeyInfo(); - 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.roleArn = 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 an AwsWrappedKeyInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsWrappedKeyInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AwsWrappedKeyInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AwsWrappedKeyInfo.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.roleArn != null && message.hasOwnProperty("roleArn")) - if (!$util.isString(message.roleArn)) - return "roleArn: 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 an AwsWrappedKeyInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.AwsWrappedKeyInfo} AwsWrappedKeyInfo - */ - AwsWrappedKeyInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.AwsWrappedKeyInfo) - return object; - var message = new $root.google.ads.datamanager.v1.AwsWrappedKeyInfo(); - 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.roleArn != null) - message.roleArn = String(object.roleArn); - 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 an AwsWrappedKeyInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {google.ads.datamanager.v1.AwsWrappedKeyInfo} message AwsWrappedKeyInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AwsWrappedKeyInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyType = options.enums === String ? "KEY_TYPE_UNSPECIFIED" : 0; - object.roleArn = ""; - object.kekUri = ""; - object.encryptedDek = ""; - } - if (message.keyType != null && message.hasOwnProperty("keyType")) - object.keyType = options.enums === String ? $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType[message.keyType] === undefined ? message.keyType : $root.google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType[message.keyType] : message.keyType; - if (message.roleArn != null && message.hasOwnProperty("roleArn")) - object.roleArn = message.roleArn; - 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 AwsWrappedKeyInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @instance - * @returns {Object.} JSON object - */ - AwsWrappedKeyInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AwsWrappedKeyInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.AwsWrappedKeyInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AwsWrappedKeyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.AwsWrappedKeyInfo"; - }; - - /** - * KeyType enum. - * @name google.ads.datamanager.v1.AwsWrappedKeyInfo.KeyType - * @enum {number} - * @property {number} KEY_TYPE_UNSPECIFIED=0 KEY_TYPE_UNSPECIFIED value - * @property {number} XCHACHA20_POLY1305=1 XCHACHA20_POLY1305 value - */ - AwsWrappedKeyInfo.KeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "XCHACHA20_POLY1305"] = 1; - return values; - })(); - - return AwsWrappedKeyInfo; - })(); - - /** - * 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} UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER=37 UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER value - * @property {number} UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER=38 UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER value - * @property {number} NO_IDENTIFIERS_PROVIDED=39 NO_IDENTIFIERS_PROVIDED value - * @property {number} INVALID_PROPERTY_TYPE=40 INVALID_PROPERTY_TYPE value - * @property {number} INVALID_STREAM_TYPE=41 INVALID_STREAM_TYPE value - * @property {number} LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT=42 LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT value - * @property {number} OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH=43 OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH value - * @property {number} EVENT_TIME_INVALID=44 EVENT_TIME_INVALID value - * @property {number} RESERVED_NAME_USED=45 RESERVED_NAME_USED value - * @property {number} INVALID_EVENT_NAME=46 INVALID_EVENT_NAME value - * @property {number} NOT_ALLOWLISTED=47 NOT_ALLOWLISTED value - * @property {number} INVALID_REQUEST_ID=48 INVALID_REQUEST_ID value - * @property {number} MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT=49 MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT value - * @property {number} FIELD_VALUE_TOO_LONG=50 FIELD_VALUE_TOO_LONG value - * @property {number} TOO_MANY_ELEMENTS=51 TOO_MANY_ELEMENTS value - * @property {number} ALREADY_EXISTS=52 ALREADY_EXISTS value - * @property {number} IMMUTABLE_FIELD_FOR_UPDATE=53 IMMUTABLE_FIELD_FOR_UPDATE value - * @property {number} INVALID_RESOURCE_NAME=54 INVALID_RESOURCE_NAME value - * @property {number} INVALID_FILTER=55 INVALID_FILTER value - * @property {number} INVALID_UPDATE_MASK=56 INVALID_UPDATE_MASK value - * @property {number} INVALID_PAGE_TOKEN=57 INVALID_PAGE_TOKEN value - * @property {number} CANNOT_UPDATE_DISABLED_LICENSE=58 CANNOT_UPDATE_DISABLED_LICENSE value - * @property {number} CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST=59 CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST value - * @property {number} INSUFFICIENT_COST=60 INSUFFICIENT_COST value - * @property {number} CANNOT_DISABLE_LICENSE=61 CANNOT_DISABLE_LICENSE value - * @property {number} INVALID_CLIENT_ACCOUNT_ID=62 INVALID_CLIENT_ACCOUNT_ID value - * @property {number} PRICING_ONLY_ZERO_COST_ALLOWED=63 PRICING_ONLY_ZERO_COST_ALLOWED value - * @property {number} PRICE_TOO_HIGH=64 PRICE_TOO_HIGH value - * @property {number} CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE=65 CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE value - * @property {number} INVALID_PRICING_END_DATE=66 INVALID_PRICING_END_DATE value - * @property {number} CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT=67 CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT value - * @property {number} MISMATCHED_ACCOUNT_TYPE=68 MISMATCHED_ACCOUNT_TYPE value - * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE=69 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE value - * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER=70 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER value - * @property {number} INVALID_MEDIA_SHARE_COST=71 INVALID_MEDIA_SHARE_COST value - * @property {number} INVALID_COST_TYPE=72 INVALID_COST_TYPE value - * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST=73 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST value - * @property {number} MAX_COST_NOT_ALLOWED=74 MAX_COST_NOT_ALLOWED value - * @property {number} COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED=75 COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED value - * @property {number} INVALID_DESCRIPTION=76 INVALID_DESCRIPTION value - * @property {number} INVALID_DISPLAY_NAME=77 INVALID_DISPLAY_NAME value - * @property {number} DISPLAY_NAME_ALREADY_USED=78 DISPLAY_NAME_ALREADY_USED value - * @property {number} OWNERSHIP_REQUIRED_FOR_UPDATE=79 OWNERSHIP_REQUIRED_FOR_UPDATE value - * @property {number} USER_LIST_MUTATION_NOT_SUPPORTED=80 USER_LIST_MUTATION_NOT_SUPPORTED value - * @property {number} SENSITIVE_USER_LIST_IMMUTABLE=81 SENSITIVE_USER_LIST_IMMUTABLE value - * @property {number} BILLABLE_RECORD_COUNT_IMMUTABLE=82 BILLABLE_RECORD_COUNT_IMMUTABLE value - * @property {number} USER_LIST_NAME_RESERVED=83 USER_LIST_NAME_RESERVED value - * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA=84 ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA value - * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_SOURCE=85 UNSUPPORTED_PARTNER_AUDIENCE_SOURCE value - * @property {number} COMMERCE_PARTNER_NOT_ALLOWED=86 COMMERCE_PARTNER_NOT_ALLOWED value - * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_INFO=87 UNSUPPORTED_PARTNER_AUDIENCE_INFO value - * @property {number} PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED=88 PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED value - * @property {number} DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=89 DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value - * @property {number} ADVERTISER_TOS_NOT_ACCEPTED=90 ADVERTISER_TOS_NOT_ACCEPTED value - * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=91 ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value - * @property {number} USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT=92 USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT value - * @property {number} INVALID_COMMERCE_PARTNER=93 INVALID_COMMERCE_PARTNER value - * @property {number} CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE=94 CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE value - * @property {number} UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES=95 UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES value - * @property {number} UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG=96 UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG value - * @property {number} UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE=97 UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE value - * @property {number} UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK=98 UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK 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[37] = "UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER"] = 37; - values[valuesById[38] = "UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER"] = 38; - values[valuesById[39] = "NO_IDENTIFIERS_PROVIDED"] = 39; - values[valuesById[40] = "INVALID_PROPERTY_TYPE"] = 40; - values[valuesById[41] = "INVALID_STREAM_TYPE"] = 41; - values[valuesById[42] = "LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT"] = 42; - values[valuesById[43] = "OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH"] = 43; - values[valuesById[44] = "EVENT_TIME_INVALID"] = 44; - values[valuesById[45] = "RESERVED_NAME_USED"] = 45; - values[valuesById[46] = "INVALID_EVENT_NAME"] = 46; - values[valuesById[47] = "NOT_ALLOWLISTED"] = 47; - values[valuesById[48] = "INVALID_REQUEST_ID"] = 48; - values[valuesById[49] = "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT"] = 49; - values[valuesById[50] = "FIELD_VALUE_TOO_LONG"] = 50; - values[valuesById[51] = "TOO_MANY_ELEMENTS"] = 51; - values[valuesById[52] = "ALREADY_EXISTS"] = 52; - values[valuesById[53] = "IMMUTABLE_FIELD_FOR_UPDATE"] = 53; - values[valuesById[54] = "INVALID_RESOURCE_NAME"] = 54; - values[valuesById[55] = "INVALID_FILTER"] = 55; - values[valuesById[56] = "INVALID_UPDATE_MASK"] = 56; - values[valuesById[57] = "INVALID_PAGE_TOKEN"] = 57; - values[valuesById[58] = "CANNOT_UPDATE_DISABLED_LICENSE"] = 58; - values[valuesById[59] = "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST"] = 59; - values[valuesById[60] = "INSUFFICIENT_COST"] = 60; - values[valuesById[61] = "CANNOT_DISABLE_LICENSE"] = 61; - values[valuesById[62] = "INVALID_CLIENT_ACCOUNT_ID"] = 62; - values[valuesById[63] = "PRICING_ONLY_ZERO_COST_ALLOWED"] = 63; - values[valuesById[64] = "PRICE_TOO_HIGH"] = 64; - values[valuesById[65] = "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE"] = 65; - values[valuesById[66] = "INVALID_PRICING_END_DATE"] = 66; - values[valuesById[67] = "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT"] = 67; - values[valuesById[68] = "MISMATCHED_ACCOUNT_TYPE"] = 68; - values[valuesById[69] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE"] = 69; - values[valuesById[70] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER"] = 70; - values[valuesById[71] = "INVALID_MEDIA_SHARE_COST"] = 71; - values[valuesById[72] = "INVALID_COST_TYPE"] = 72; - values[valuesById[73] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST"] = 73; - values[valuesById[74] = "MAX_COST_NOT_ALLOWED"] = 74; - values[valuesById[75] = "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED"] = 75; - values[valuesById[76] = "INVALID_DESCRIPTION"] = 76; - values[valuesById[77] = "INVALID_DISPLAY_NAME"] = 77; - values[valuesById[78] = "DISPLAY_NAME_ALREADY_USED"] = 78; - values[valuesById[79] = "OWNERSHIP_REQUIRED_FOR_UPDATE"] = 79; - values[valuesById[80] = "USER_LIST_MUTATION_NOT_SUPPORTED"] = 80; - values[valuesById[81] = "SENSITIVE_USER_LIST_IMMUTABLE"] = 81; - values[valuesById[82] = "BILLABLE_RECORD_COUNT_IMMUTABLE"] = 82; - values[valuesById[83] = "USER_LIST_NAME_RESERVED"] = 83; - values[valuesById[84] = "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA"] = 84; - values[valuesById[85] = "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE"] = 85; - values[valuesById[86] = "COMMERCE_PARTNER_NOT_ALLOWED"] = 86; - values[valuesById[87] = "UNSUPPORTED_PARTNER_AUDIENCE_INFO"] = 87; - values[valuesById[88] = "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED"] = 88; - values[valuesById[89] = "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 89; - values[valuesById[90] = "ADVERTISER_TOS_NOT_ACCEPTED"] = 90; - values[valuesById[91] = "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 91; - values[valuesById[92] = "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT"] = 92; - values[valuesById[93] = "INVALID_COMMERCE_PARTNER"] = 93; - values[valuesById[94] = "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE"] = 94; - values[valuesById[95] = "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES"] = 95; - values[valuesById[96] = "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG"] = 96; - values[valuesById[97] = "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE"] = 97; - values[valuesById[98] = "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK"] = 98; - 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 - * @property {string|null} [eventName] Event eventName - * @property {string|null} [clientId] Event clientId - * @property {string|null} [userId] Event userId - * @property {Array.|null} [additionalEventParameters] Event additionalEventParameters - */ - - /** - * 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 = []; - this.additionalEventParameters = []; - if (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|null|undefined} conversionValue - * @memberof google.ads.datamanager.v1.Event - * @instance - */ - Event.prototype.conversionValue = null; - - /** - * 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; - - /** - * Event eventName. - * @member {string} eventName - * @memberof google.ads.datamanager.v1.Event - * @instance - */ - Event.prototype.eventName = ""; - - /** - * Event clientId. - * @member {string} clientId - * @memberof google.ads.datamanager.v1.Event - * @instance - */ - Event.prototype.clientId = ""; - - /** - * Event userId. - * @member {string} userId - * @memberof google.ads.datamanager.v1.Event - * @instance - */ - Event.prototype.userId = ""; - - /** - * Event additionalEventParameters. - * @member {Array.} additionalEventParameters - * @memberof google.ads.datamanager.v1.Event - * @instance - */ - Event.prototype.additionalEventParameters = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Event.prototype, "_conversionValue", { - get: $util.oneOfGetter($oneOfFields = ["conversionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * 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(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.eventName); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.clientId); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.userId); - if (message.additionalEventParameters != null && message.additionalEventParameters.length) - for (var i = 0; i < message.additionalEventParameters.length; ++i) - $root.google.ads.datamanager.v1.EventParameter.encode(message.additionalEventParameters[i], writer.uint32(/* id 19, wireType 2 =*/154).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; - } - case 16: { - message.eventName = reader.string(); - break; - } - case 17: { - message.clientId = reader.string(); - break; - } - case 18: { - message.userId = reader.string(); - break; - } - case 19: { - if (!(message.additionalEventParameters && message.additionalEventParameters.length)) - message.additionalEventParameters = []; - message.additionalEventParameters.push($root.google.ads.datamanager.v1.EventParameter.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"; - 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.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")) { - properties._conversionValue = 1; - 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; - } - if (message.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.additionalEventParameters != null && message.hasOwnProperty("additionalEventParameters")) { - if (!Array.isArray(message.additionalEventParameters)) - return "additionalEventParameters: array expected"; - for (var i = 0; i < message.additionalEventParameters.length; ++i) { - var error = $root.google.ads.datamanager.v1.EventParameter.verify(message.additionalEventParameters[i]); - if (error) - return "additionalEventParameters." + 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); - } - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.userId != null) - message.userId = String(object.userId); - if (object.additionalEventParameters) { - if (!Array.isArray(object.additionalEventParameters)) - throw TypeError(".google.ads.datamanager.v1.Event.additionalEventParameters: array expected"); - message.additionalEventParameters = []; - for (var i = 0; i < object.additionalEventParameters.length; ++i) { - if (typeof object.additionalEventParameters[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.Event.additionalEventParameters: object expected"); - message.additionalEventParameters[i] = $root.google.ads.datamanager.v1.EventParameter.fromObject(object.additionalEventParameters[i]); - } - } - 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 = []; - object.additionalEventParameters = []; - } - if (options.defaults) { - object.transactionId = ""; - object.eventTimestamp = null; - object.lastUpdatedTimestamp = null; - object.userData = null; - object.consent = null; - object.adIdentifiers = null; - object.currency = ""; - object.eventSource = options.enums === String ? "EVENT_SOURCE_UNSPECIFIED" : 0; - object.eventDeviceInfo = null; - object.cartData = null; - object.userProperties = null; - object.eventName = ""; - object.clientId = ""; - object.userId = ""; - } - 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 (options.oneofs) - object._conversionValue = "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); - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.additionalEventParameters && message.additionalEventParameters.length) { - object.additionalEventParameters = []; - for (var j = 0; j < message.additionalEventParameters.length; ++j) - object.additionalEventParameters[j] = $root.google.ads.datamanager.v1.EventParameter.toObject(message.additionalEventParameters[j], 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; - })(); - - v1.EventParameter = (function() { - - /** - * Properties of an EventParameter. - * @memberof google.ads.datamanager.v1 - * @interface IEventParameter - * @property {string|null} [parameterName] EventParameter parameterName - * @property {string|null} [value] EventParameter value - */ - - /** - * Constructs a new EventParameter. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an EventParameter. - * @implements IEventParameter - * @constructor - * @param {google.ads.datamanager.v1.IEventParameter=} [properties] Properties to set - */ - function EventParameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventParameter parameterName. - * @member {string} parameterName - * @memberof google.ads.datamanager.v1.EventParameter - * @instance - */ - EventParameter.prototype.parameterName = ""; - - /** - * EventParameter value. - * @member {string} value - * @memberof google.ads.datamanager.v1.EventParameter - * @instance - */ - EventParameter.prototype.value = ""; - - /** - * Creates a new EventParameter instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {google.ads.datamanager.v1.IEventParameter=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.EventParameter} EventParameter instance - */ - EventParameter.create = function create(properties) { - return new EventParameter(properties); - }; - - /** - * Encodes the specified EventParameter message. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {google.ads.datamanager.v1.IEventParameter} message EventParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventParameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameterName); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified EventParameter message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.EventParameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {google.ads.datamanager.v1.IEventParameter} message EventParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventParameter message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.EventParameter - * @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.EventParameter} EventParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventParameter.decode = function decode(reader, 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.EventParameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parameterName = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventParameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.EventParameter} EventParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventParameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventParameter message. - * @function verify - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventParameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - if (!$util.isString(message.parameterName)) - return "parameterName: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EventParameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.EventParameter} EventParameter - */ - EventParameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.EventParameter) - return object; - var message = new $root.google.ads.datamanager.v1.EventParameter(); - if (object.parameterName != null) - message.parameterName = String(object.parameterName); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EventParameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {google.ads.datamanager.v1.EventParameter} message EventParameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventParameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameterName = ""; - object.value = ""; - } - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - object.parameterName = message.parameterName; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this EventParameter to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.EventParameter - * @instance - * @returns {Object.} JSON object - */ - EventParameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventParameter - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.EventParameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.EventParameter"; - }; - - return EventParameter; - })(); - - /** - * 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 - * @property {Array.|null} [additionalUserProperties] UserProperties additionalUserProperties - */ - - /** - * 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) { - this.additionalUserProperties = []; - if (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; - - /** - * UserProperties additionalUserProperties. - * @member {Array.} additionalUserProperties - * @memberof google.ads.datamanager.v1.UserProperties - * @instance - */ - UserProperties.prototype.additionalUserProperties = $util.emptyArray; - - /** - * 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); - if (message.additionalUserProperties != null && message.additionalUserProperties.length) - for (var i = 0; i < message.additionalUserProperties.length; ++i) - $root.google.ads.datamanager.v1.UserProperty.encode(message.additionalUserProperties[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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; - } - case 3: { - if (!(message.additionalUserProperties && message.additionalUserProperties.length)) - message.additionalUserProperties = []; - message.additionalUserProperties.push($root.google.ads.datamanager.v1.UserProperty.decode(reader, reader.uint32())); - 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; - } - if (message.additionalUserProperties != null && message.hasOwnProperty("additionalUserProperties")) { - if (!Array.isArray(message.additionalUserProperties)) - return "additionalUserProperties: array expected"; - for (var i = 0; i < message.additionalUserProperties.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserProperty.verify(message.additionalUserProperties[i]); - if (error) - return "additionalUserProperties." + error; - } - } - 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; - } - if (object.additionalUserProperties) { - if (!Array.isArray(object.additionalUserProperties)) - throw TypeError(".google.ads.datamanager.v1.UserProperties.additionalUserProperties: array expected"); - message.additionalUserProperties = []; - for (var i = 0; i < object.additionalUserProperties.length; ++i) { - if (typeof object.additionalUserProperties[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.UserProperties.additionalUserProperties: object expected"); - message.additionalUserProperties[i] = $root.google.ads.datamanager.v1.UserProperty.fromObject(object.additionalUserProperties[i]); - } - } - 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.arrays || options.defaults) - object.additionalUserProperties = []; - 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; - if (message.additionalUserProperties && message.additionalUserProperties.length) { - object.additionalUserProperties = []; - for (var j = 0; j < message.additionalUserProperties.length; ++j) - object.additionalUserProperties[j] = $root.google.ads.datamanager.v1.UserProperty.toObject(message.additionalUserProperties[j], options); - } - 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; - })(); - - v1.UserProperty = (function() { - - /** - * Properties of a UserProperty. - * @memberof google.ads.datamanager.v1 - * @interface IUserProperty - * @property {string|null} [propertyName] UserProperty propertyName - * @property {string|null} [value] UserProperty value - */ - - /** - * Constructs a new UserProperty. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserProperty. - * @implements IUserProperty - * @constructor - * @param {google.ads.datamanager.v1.IUserProperty=} [properties] Properties to set - */ - function UserProperty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserProperty propertyName. - * @member {string} propertyName - * @memberof google.ads.datamanager.v1.UserProperty - * @instance - */ - UserProperty.prototype.propertyName = ""; - - /** - * UserProperty value. - * @member {string} value - * @memberof google.ads.datamanager.v1.UserProperty - * @instance - */ - UserProperty.prototype.value = ""; - - /** - * Creates a new UserProperty instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {google.ads.datamanager.v1.IUserProperty=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserProperty} UserProperty instance - */ - UserProperty.create = function create(properties) { - return new UserProperty(properties); - }; - - /** - * Encodes the specified UserProperty message. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {google.ads.datamanager.v1.IUserProperty} message UserProperty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserProperty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.propertyName != null && Object.hasOwnProperty.call(message, "propertyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.propertyName); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified UserProperty message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserProperty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {google.ads.datamanager.v1.IUserProperty} message UserProperty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserProperty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserProperty message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserProperty - * @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.UserProperty} UserProperty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserProperty.decode = function decode(reader, 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.UserProperty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.propertyName = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserProperty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserProperty} UserProperty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserProperty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserProperty message. - * @function verify - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserProperty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.propertyName != null && message.hasOwnProperty("propertyName")) - if (!$util.isString(message.propertyName)) - return "propertyName: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a UserProperty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserProperty} UserProperty - */ - UserProperty.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserProperty) - return object; - var message = new $root.google.ads.datamanager.v1.UserProperty(); - if (object.propertyName != null) - message.propertyName = String(object.propertyName); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a UserProperty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {google.ads.datamanager.v1.UserProperty} message UserProperty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserProperty.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.propertyName = ""; - object.value = ""; - } - if (message.propertyName != null && message.hasOwnProperty("propertyName")) - object.propertyName = message.propertyName; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UserProperty to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserProperty - * @instance - * @returns {Object.} JSON object - */ - UserProperty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserProperty - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserProperty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserProperty"; - }; - - return UserProperty; - })(); - - /** - * 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; - })(); - - /** - * Gender enum. - * @name google.ads.datamanager.v1.Gender - * @enum {number} - * @property {number} GENDER_UNSPECIFIED=0 GENDER_UNSPECIFIED value - * @property {number} GENDER_UNKNOWN=1 GENDER_UNKNOWN value - * @property {number} GENDER_MALE=2 GENDER_MALE value - * @property {number} GENDER_FEMALE=3 GENDER_FEMALE value - */ - v1.Gender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "GENDER_UNKNOWN"] = 1; - values[valuesById[2] = "GENDER_MALE"] = 2; - values[valuesById[3] = "GENDER_FEMALE"] = 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 - * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null} [userIdDataIngestionStatus] IngestAudienceMembersStatus userIdDataIngestionStatus - * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null} [ppidDataIngestionStatus] IngestAudienceMembersStatus ppidDataIngestionStatus - */ - - /** - * 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; - - /** - * IngestAudienceMembersStatus userIdDataIngestionStatus. - * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null|undefined} userIdDataIngestionStatus - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus - * @instance - */ - IngestAudienceMembersStatus.prototype.userIdDataIngestionStatus = null; - - /** - * IngestAudienceMembersStatus ppidDataIngestionStatus. - * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null|undefined} ppidDataIngestionStatus - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus - * @instance - */ - IngestAudienceMembersStatus.prototype.ppidDataIngestionStatus = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IngestAudienceMembersStatus status. - * @member {"userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"|undefined} status - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus - * @instance - */ - Object.defineProperty(IngestAudienceMembersStatus.prototype, "status", { - get: $util.oneOfGetter($oneOfFields = ["userDataIngestionStatus", "mobileDataIngestionStatus", "pairDataIngestionStatus", "userIdDataIngestionStatus", "ppidDataIngestionStatus"]), - 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(); - if (message.userIdDataIngestionStatus != null && Object.hasOwnProperty.call(message, "userIdDataIngestionStatus")) - $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.encode(message.userIdDataIngestionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.ppidDataIngestionStatus != null && Object.hasOwnProperty.call(message, "ppidDataIngestionStatus")) - $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.encode(message.ppidDataIngestionStatus, writer.uint32(/* id 5, wireType 2 =*/42).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; - } - case 4: { - message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.decode(reader, reader.uint32()); - break; - } - case 5: { - message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.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; - } - } - if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { - if (properties.status === 1) - return "status: multiple values"; - properties.status = 1; - { - var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify(message.userIdDataIngestionStatus); - if (error) - return "userIdDataIngestionStatus." + error; - } - } - if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { - if (properties.status === 1) - return "status: multiple values"; - properties.status = 1; - { - var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify(message.ppidDataIngestionStatus); - if (error) - return "ppidDataIngestionStatus." + 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); - } - if (object.userIdDataIngestionStatus != null) { - if (typeof object.userIdDataIngestionStatus !== "object") - throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.userIdDataIngestionStatus: object expected"); - message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.fromObject(object.userIdDataIngestionStatus); - } - if (object.ppidDataIngestionStatus != null) { - if (typeof object.ppidDataIngestionStatus !== "object") - throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.ppidDataIngestionStatus: object expected"); - message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.fromObject(object.ppidDataIngestionStatus); - } - 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"; - } - if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { - object.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.toObject(message.userIdDataIngestionStatus, options); - if (options.oneofs) - object.status = "userIdDataIngestionStatus"; - } - if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { - object.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.toObject(message.ppidDataIngestionStatus, options); - if (options.oneofs) - object.status = "ppidDataIngestionStatus"; - } - 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 - * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null} [userIdDataRemovalStatus] RemoveAudienceMembersStatus userIdDataRemovalStatus - * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null} [ppidDataRemovalStatus] RemoveAudienceMembersStatus ppidDataRemovalStatus - */ - - /** - * 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; - - /** - * RemoveAudienceMembersStatus userIdDataRemovalStatus. - * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null|undefined} userIdDataRemovalStatus - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus - * @instance - */ - RemoveAudienceMembersStatus.prototype.userIdDataRemovalStatus = null; - - /** - * RemoveAudienceMembersStatus ppidDataRemovalStatus. - * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null|undefined} ppidDataRemovalStatus - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus - * @instance - */ - RemoveAudienceMembersStatus.prototype.ppidDataRemovalStatus = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RemoveAudienceMembersStatus status. - * @member {"userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"|undefined} status - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus - * @instance - */ - Object.defineProperty(RemoveAudienceMembersStatus.prototype, "status", { - get: $util.oneOfGetter($oneOfFields = ["userDataRemovalStatus", "mobileDataRemovalStatus", "pairDataRemovalStatus", "userIdDataRemovalStatus", "ppidDataRemovalStatus"]), - 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(); - if (message.userIdDataRemovalStatus != null && Object.hasOwnProperty.call(message, "userIdDataRemovalStatus")) - $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.encode(message.userIdDataRemovalStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.ppidDataRemovalStatus != null && Object.hasOwnProperty.call(message, "ppidDataRemovalStatus")) - $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.encode(message.ppidDataRemovalStatus, writer.uint32(/* id 5, wireType 2 =*/42).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; - } - case 4: { - message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.decode(reader, reader.uint32()); - break; - } - case 5: { - message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.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; - } - } - if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { - if (properties.status === 1) - return "status: multiple values"; - properties.status = 1; - { - var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify(message.userIdDataRemovalStatus); - if (error) - return "userIdDataRemovalStatus." + error; - } - } - if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { - if (properties.status === 1) - return "status: multiple values"; - properties.status = 1; - { - var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify(message.ppidDataRemovalStatus); - if (error) - return "ppidDataRemovalStatus." + 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); - } - if (object.userIdDataRemovalStatus != null) { - if (typeof object.userIdDataRemovalStatus !== "object") - throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.userIdDataRemovalStatus: object expected"); - message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.fromObject(object.userIdDataRemovalStatus); - } - if (object.ppidDataRemovalStatus != null) { - if (typeof object.ppidDataRemovalStatus !== "object") - throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.ppidDataRemovalStatus: object expected"); - message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.fromObject(object.ppidDataRemovalStatus); - } - 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"; - } - if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { - object.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.toObject(message.userIdDataRemovalStatus, options); - if (options.oneofs) - object.status = "userIdDataRemovalStatus"; - } - if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { - object.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.toObject(message.ppidDataRemovalStatus, options); - if (options.oneofs) - object.status = "ppidDataRemovalStatus"; - } - 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; - })(); - - RequestStatusPerDestination.IngestUserIdDataStatus = (function() { - - /** - * Properties of an IngestUserIdDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @interface IIngestUserIdDataStatus - * @property {number|Long|null} [recordCount] IngestUserIdDataStatus recordCount - * @property {number|Long|null} [userIdCount] IngestUserIdDataStatus userIdCount - */ - - /** - * Constructs a new IngestUserIdDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @classdesc Represents an IngestUserIdDataStatus. - * @implements IIngestUserIdDataStatus - * @constructor - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set - */ - function IngestUserIdDataStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IngestUserIdDataStatus recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @instance - */ - IngestUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IngestUserIdDataStatus userIdCount. - * @member {number|Long} userIdCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @instance - */ - IngestUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new IngestUserIdDataStatus instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus instance - */ - IngestUserIdDataStatus.create = function create(properties) { - return new IngestUserIdDataStatus(properties); - }; - - /** - * Encodes the specified IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); - return writer; - }; - - /** - * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestUserIdDataStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @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.IngestUserIdDataStatus} IngestUserIdDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestUserIdDataStatus.decode = function decode(reader, 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.IngestUserIdDataStatus(); - 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.userIdCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestUserIdDataStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IngestUserIdDataStatus message. - * @function verify - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) - if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) - return "userIdCount: integer|Long expected"; - return null; - }; - - /** - * Creates an IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus - */ - IngestUserIdDataStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus) - return object; - var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus(); - 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.userIdCount != null) - if ($util.Long) - (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; - else if (typeof object.userIdCount === "string") - message.userIdCount = parseInt(object.userIdCount, 10); - else if (typeof object.userIdCount === "number") - message.userIdCount = object.userIdCount; - else if (typeof object.userIdCount === "object") - message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} message IngestUserIdDataStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) - if (typeof message.userIdCount === "number") - object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; - else - object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; - return object; - }; - - /** - * Converts this IngestUserIdDataStatus to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @instance - * @returns {Object.} JSON object - */ - IngestUserIdDataStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IngestUserIdDataStatus - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus"; - }; - - return IngestUserIdDataStatus; - })(); - - RequestStatusPerDestination.RemoveUserIdDataStatus = (function() { - - /** - * Properties of a RemoveUserIdDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @interface IRemoveUserIdDataStatus - * @property {number|Long|null} [recordCount] RemoveUserIdDataStatus recordCount - * @property {number|Long|null} [userIdCount] RemoveUserIdDataStatus userIdCount - */ - - /** - * Constructs a new RemoveUserIdDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @classdesc Represents a RemoveUserIdDataStatus. - * @implements IRemoveUserIdDataStatus - * @constructor - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set - */ - function RemoveUserIdDataStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveUserIdDataStatus recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @instance - */ - RemoveUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RemoveUserIdDataStatus userIdCount. - * @member {number|Long} userIdCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @instance - */ - RemoveUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new RemoveUserIdDataStatus instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus instance - */ - RemoveUserIdDataStatus.create = function create(properties) { - return new RemoveUserIdDataStatus(properties); - }; - - /** - * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); - return writer; - }; - - /** - * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveUserIdDataStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @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.RemoveUserIdDataStatus} RemoveUserIdDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveUserIdDataStatus.decode = function decode(reader, 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.RemoveUserIdDataStatus(); - 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.userIdCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveUserIdDataStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveUserIdDataStatus message. - * @function verify - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) - if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) - return "userIdCount: integer|Long expected"; - return null; - }; - - /** - * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus - */ - RemoveUserIdDataStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus) - return object; - var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus(); - 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.userIdCount != null) - if ($util.Long) - (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; - else if (typeof object.userIdCount === "string") - message.userIdCount = parseInt(object.userIdCount, 10); - else if (typeof object.userIdCount === "number") - message.userIdCount = object.userIdCount; - else if (typeof object.userIdCount === "object") - message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} message RemoveUserIdDataStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) - if (typeof message.userIdCount === "number") - object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; - else - object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; - return object; - }; - - /** - * Converts this RemoveUserIdDataStatus to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @instance - * @returns {Object.} JSON object - */ - RemoveUserIdDataStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemoveUserIdDataStatus - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemoveUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus"; - }; - - return RemoveUserIdDataStatus; - })(); - - RequestStatusPerDestination.IngestPpidDataStatus = (function() { - - /** - * Properties of an IngestPpidDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @interface IIngestPpidDataStatus - * @property {number|Long|null} [recordCount] IngestPpidDataStatus recordCount - * @property {number|Long|null} [ppidCount] IngestPpidDataStatus ppidCount - */ - - /** - * Constructs a new IngestPpidDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @classdesc Represents an IngestPpidDataStatus. - * @implements IIngestPpidDataStatus - * @constructor - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set - */ - function IngestPpidDataStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IngestPpidDataStatus recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @instance - */ - IngestPpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IngestPpidDataStatus ppidCount. - * @member {number|Long} ppidCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @instance - */ - IngestPpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new IngestPpidDataStatus instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus instance - */ - IngestPpidDataStatus.create = function create(properties) { - return new IngestPpidDataStatus(properties); - }; - - /** - * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestPpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); - return writer; - }; - - /** - * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestPpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IngestPpidDataStatus message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @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.IngestPpidDataStatus} IngestPpidDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestPpidDataStatus.decode = function decode(reader, 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.IngestPpidDataStatus(); - 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.ppidCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestPpidDataStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IngestPpidDataStatus message. - * @function verify - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestPpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) - if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) - return "ppidCount: integer|Long expected"; - return null; - }; - - /** - * Creates an IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus - */ - IngestPpidDataStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus) - return object; - var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus(); - 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.ppidCount != null) - if ($util.Long) - (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; - else if (typeof object.ppidCount === "string") - message.ppidCount = parseInt(object.ppidCount, 10); - else if (typeof object.ppidCount === "number") - message.ppidCount = object.ppidCount; - else if (typeof object.ppidCount === "object") - message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} message IngestPpidDataStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestPpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) - if (typeof message.ppidCount === "number") - object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; - else - object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; - return object; - }; - - /** - * Converts this IngestPpidDataStatus to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @instance - * @returns {Object.} JSON object - */ - IngestPpidDataStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IngestPpidDataStatus - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestPpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus"; - }; - - return IngestPpidDataStatus; - })(); - - RequestStatusPerDestination.RemovePpidDataStatus = (function() { - - /** - * Properties of a RemovePpidDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @interface IRemovePpidDataStatus - * @property {number|Long|null} [recordCount] RemovePpidDataStatus recordCount - * @property {number|Long|null} [ppidCount] RemovePpidDataStatus ppidCount - */ - - /** - * Constructs a new RemovePpidDataStatus. - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination - * @classdesc Represents a RemovePpidDataStatus. - * @implements IRemovePpidDataStatus - * @constructor - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set - */ - function RemovePpidDataStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemovePpidDataStatus recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @instance - */ - RemovePpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RemovePpidDataStatus ppidCount. - * @member {number|Long} ppidCount - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @instance - */ - RemovePpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new RemovePpidDataStatus instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus instance - */ - RemovePpidDataStatus.create = function create(properties) { - return new RemovePpidDataStatus(properties); - }; - - /** - * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); - return writer; - }; - - /** - * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemovePpidDataStatus message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @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.RemovePpidDataStatus} RemovePpidDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePpidDataStatus.decode = function decode(reader, 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.RemovePpidDataStatus(); - 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.ppidCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePpidDataStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemovePpidDataStatus message. - * @function verify - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemovePpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) - if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) - return "ppidCount: integer|Long expected"; - return null; - }; - - /** - * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus - */ - RemovePpidDataStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus) - return object; - var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus(); - 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.ppidCount != null) - if ($util.Long) - (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; - else if (typeof object.ppidCount === "string") - message.ppidCount = parseInt(object.ppidCount, 10); - else if (typeof object.ppidCount === "number") - message.ppidCount = object.ppidCount; - else if (typeof object.ppidCount === "object") - message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} message RemovePpidDataStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemovePpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) - if (typeof message.ppidCount === "number") - object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; - else - object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; - return object; - }; - - /** - * Converts this RemovePpidDataStatus to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @instance - * @returns {Object.} JSON object - */ - RemovePpidDataStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemovePpidDataStatus - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemovePpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus"; - }; - - return RemovePpidDataStatus; - })(); - - 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 27: - 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_AWS_AUTH_FAILED": - case 27: - message.reason = 27; - 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: - case 9: - 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; - case "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": - case 9: - message.reason = 9; - 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_AWS_AUTH_FAILED=27 PROCESSING_ERROR_REASON_AWS_AUTH_FAILED 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[27] = "PROCESSING_ERROR_REASON_AWS_AUTH_FAILED"] = 27; - 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 - * @property {number} PROCESSING_WARNING_REASON_AWS_AUTH_FAILED=9 PROCESSING_WARNING_REASON_AWS_AUTH_FAILED 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; - values[valuesById[9] = "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED"] = 9; - 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; - })(); - - v1.MarketingDataInsightsService = (function() { - - /** - * Constructs a new MarketingDataInsightsService service. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a MarketingDataInsightsService - * @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 MarketingDataInsightsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MarketingDataInsightsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MarketingDataInsightsService; - - /** - * Creates new MarketingDataInsightsService service using the specified rpc implementation. - * @function create - * @memberof google.ads.datamanager.v1.MarketingDataInsightsService - * @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 {MarketingDataInsightsService} RPC service. Useful where requests and/or responses are streamed. - */ - MarketingDataInsightsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. - * @memberof google.ads.datamanager.v1.MarketingDataInsightsService - * @typedef RetrieveInsightsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} [response] RetrieveInsightsResponse - */ - - /** - * Calls RetrieveInsights. - * @function retrieveInsights - * @memberof google.ads.datamanager.v1.MarketingDataInsightsService - * @instance - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object - * @param {google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback} callback Node-style callback called with the error, if any, and RetrieveInsightsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MarketingDataInsightsService.prototype.retrieveInsights = function retrieveInsights(request, callback) { - return this.rpcCall(retrieveInsights, $root.google.ads.datamanager.v1.RetrieveInsightsRequest, $root.google.ads.datamanager.v1.RetrieveInsightsResponse, request, callback); - }, "name", { value: "RetrieveInsights" }); - - /** - * Calls RetrieveInsights. - * @function retrieveInsights - * @memberof google.ads.datamanager.v1.MarketingDataInsightsService - * @instance - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MarketingDataInsightsService; - })(); - - v1.RetrieveInsightsRequest = (function() { - - /** - * Properties of a RetrieveInsightsRequest. - * @memberof google.ads.datamanager.v1 - * @interface IRetrieveInsightsRequest - * @property {string|null} [parent] RetrieveInsightsRequest parent - * @property {google.ads.datamanager.v1.IBaseline|null} [baseline] RetrieveInsightsRequest baseline - * @property {string|null} [userListId] RetrieveInsightsRequest userListId - */ - - /** - * Constructs a new RetrieveInsightsRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a RetrieveInsightsRequest. - * @implements IRetrieveInsightsRequest - * @constructor - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set - */ - function RetrieveInsightsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RetrieveInsightsRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @instance - */ - RetrieveInsightsRequest.prototype.parent = ""; - - /** - * RetrieveInsightsRequest baseline. - * @member {google.ads.datamanager.v1.IBaseline|null|undefined} baseline - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @instance - */ - RetrieveInsightsRequest.prototype.baseline = null; - - /** - * RetrieveInsightsRequest userListId. - * @member {string} userListId - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @instance - */ - RetrieveInsightsRequest.prototype.userListId = ""; - - /** - * Creates a new RetrieveInsightsRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest instance - */ - RetrieveInsightsRequest.create = function create(properties) { - return new RetrieveInsightsRequest(properties); - }; - - /** - * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveInsightsRequest.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.baseline != null && Object.hasOwnProperty.call(message, "baseline")) - $root.google.ads.datamanager.v1.Baseline.encode(message.baseline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.userListId != null && Object.hasOwnProperty.call(message, "userListId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListId); - return writer; - }; - - /** - * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveInsightsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @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.RetrieveInsightsRequest} RetrieveInsightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveInsightsRequest.decode = function decode(reader, 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.RetrieveInsightsRequest(); - 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.baseline = $root.google.ads.datamanager.v1.Baseline.decode(reader, reader.uint32()); - break; - } - case 3: { - message.userListId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveInsightsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetrieveInsightsRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetrieveInsightsRequest.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.baseline != null && message.hasOwnProperty("baseline")) { - var error = $root.google.ads.datamanager.v1.Baseline.verify(message.baseline); - if (error) - return "baseline." + error; - } - if (message.userListId != null && message.hasOwnProperty("userListId")) - if (!$util.isString(message.userListId)) - return "userListId: string expected"; - return null; - }; - - /** - * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest - */ - RetrieveInsightsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsRequest) - return object; - var message = new $root.google.ads.datamanager.v1.RetrieveInsightsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.baseline != null) { - if (typeof object.baseline !== "object") - throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsRequest.baseline: object expected"); - message.baseline = $root.google.ads.datamanager.v1.Baseline.fromObject(object.baseline); - } - if (object.userListId != null) - message.userListId = String(object.userListId); - return message; - }; - - /** - * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsRequest} message RetrieveInsightsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetrieveInsightsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.baseline = null; - object.userListId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.baseline != null && message.hasOwnProperty("baseline")) - object.baseline = $root.google.ads.datamanager.v1.Baseline.toObject(message.baseline, options); - if (message.userListId != null && message.hasOwnProperty("userListId")) - object.userListId = message.userListId; - return object; - }; - - /** - * Converts this RetrieveInsightsRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @instance - * @returns {Object.} JSON object - */ - RetrieveInsightsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetrieveInsightsRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetrieveInsightsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsRequest"; - }; - - return RetrieveInsightsRequest; - })(); - - v1.Baseline = (function() { - - /** - * Properties of a Baseline. - * @memberof google.ads.datamanager.v1 - * @interface IBaseline - * @property {google.ads.datamanager.v1.Baseline.ILocation|null} [baselineLocation] Baseline baselineLocation - * @property {boolean|null} [locationAutoDetectionEnabled] Baseline locationAutoDetectionEnabled - */ - - /** - * Constructs a new Baseline. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a Baseline. - * @implements IBaseline - * @constructor - * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set - */ - function Baseline(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Baseline baselineLocation. - * @member {google.ads.datamanager.v1.Baseline.ILocation|null|undefined} baselineLocation - * @memberof google.ads.datamanager.v1.Baseline - * @instance - */ - Baseline.prototype.baselineLocation = null; - - /** - * Baseline locationAutoDetectionEnabled. - * @member {boolean|null|undefined} locationAutoDetectionEnabled - * @memberof google.ads.datamanager.v1.Baseline - * @instance - */ - Baseline.prototype.locationAutoDetectionEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Baseline baseline. - * @member {"baselineLocation"|"locationAutoDetectionEnabled"|undefined} baseline - * @memberof google.ads.datamanager.v1.Baseline - * @instance - */ - Object.defineProperty(Baseline.prototype, "baseline", { - get: $util.oneOfGetter($oneOfFields = ["baselineLocation", "locationAutoDetectionEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Baseline instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.Baseline} Baseline instance - */ - Baseline.create = function create(properties) { - return new Baseline(properties); - }; - - /** - * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Baseline.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baselineLocation != null && Object.hasOwnProperty.call(message, "baselineLocation")) - $root.google.ads.datamanager.v1.Baseline.Location.encode(message.baselineLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.locationAutoDetectionEnabled != null && Object.hasOwnProperty.call(message, "locationAutoDetectionEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.locationAutoDetectionEnabled); - return writer; - }; - - /** - * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Baseline.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Baseline message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.Baseline - * @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.Baseline} Baseline - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Baseline.decode = function decode(reader, 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.Baseline(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.decode(reader, reader.uint32()); - break; - } - case 2: { - message.locationAutoDetectionEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Baseline message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.Baseline} Baseline - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Baseline.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Baseline message. - * @function verify - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Baseline.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { - properties.baseline = 1; - { - var error = $root.google.ads.datamanager.v1.Baseline.Location.verify(message.baselineLocation); - if (error) - return "baselineLocation." + error; - } - } - if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { - if (properties.baseline === 1) - return "baseline: multiple values"; - properties.baseline = 1; - if (typeof message.locationAutoDetectionEnabled !== "boolean") - return "locationAutoDetectionEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a Baseline message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.Baseline} Baseline - */ - Baseline.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.Baseline) - return object; - var message = new $root.google.ads.datamanager.v1.Baseline(); - if (object.baselineLocation != null) { - if (typeof object.baselineLocation !== "object") - throw TypeError(".google.ads.datamanager.v1.Baseline.baselineLocation: object expected"); - message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.fromObject(object.baselineLocation); - } - if (object.locationAutoDetectionEnabled != null) - message.locationAutoDetectionEnabled = Boolean(object.locationAutoDetectionEnabled); - return message; - }; - - /** - * Creates a plain object from a Baseline message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {google.ads.datamanager.v1.Baseline} message Baseline - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Baseline.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { - object.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.toObject(message.baselineLocation, options); - if (options.oneofs) - object.baseline = "baselineLocation"; - } - if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { - object.locationAutoDetectionEnabled = message.locationAutoDetectionEnabled; - if (options.oneofs) - object.baseline = "locationAutoDetectionEnabled"; - } - return object; - }; - - /** - * Converts this Baseline to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.Baseline - * @instance - * @returns {Object.} JSON object - */ - Baseline.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Baseline - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.Baseline - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Baseline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.Baseline"; - }; - - Baseline.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.ads.datamanager.v1.Baseline - * @interface ILocation - * @property {Array.|null} [regionCodes] Location regionCodes - */ - - /** - * Constructs a new Location. - * @memberof google.ads.datamanager.v1.Baseline - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.regionCodes = []; - if (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 regionCodes. - * @member {Array.} regionCodes - * @memberof google.ads.datamanager.v1.Baseline.Location - * @instance - */ - Location.prototype.regionCodes = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.Baseline.Location - * @static - * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.Baseline.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.Baseline.Location - * @static - * @param {google.ads.datamanager.v1.Baseline.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.regionCodes != null && message.regionCodes.length) - for (var i = 0; i < message.regionCodes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.regionCodes[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.Baseline.Location - * @static - * @param {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location - * @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.Baseline.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.ads.datamanager.v1.Baseline.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.regionCodes && message.regionCodes.length)) - message.regionCodes = []; - message.regionCodes.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.ads.datamanager.v1.Baseline.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.regionCodes != null && message.hasOwnProperty("regionCodes")) { - if (!Array.isArray(message.regionCodes)) - return "regionCodes: array expected"; - for (var i = 0; i < message.regionCodes.length; ++i) - if (!$util.isString(message.regionCodes[i])) - return "regionCodes: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.Baseline.Location - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.Baseline.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.Baseline.Location) - return object; - var message = new $root.google.ads.datamanager.v1.Baseline.Location(); - if (object.regionCodes) { - if (!Array.isArray(object.regionCodes)) - throw TypeError(".google.ads.datamanager.v1.Baseline.Location.regionCodes: array expected"); - message.regionCodes = []; - for (var i = 0; i < object.regionCodes.length; ++i) - message.regionCodes[i] = String(object.regionCodes[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.Baseline.Location - * @static - * @param {google.ads.datamanager.v1.Baseline.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.regionCodes = []; - if (message.regionCodes && message.regionCodes.length) { - object.regionCodes = []; - for (var j = 0; j < message.regionCodes.length; ++j) - object.regionCodes[j] = message.regionCodes[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location"; - }; - - return Location; - })(); - - return Baseline; - })(); - - v1.RetrieveInsightsResponse = (function() { - - /** - * Properties of a RetrieveInsightsResponse. - * @memberof google.ads.datamanager.v1 - * @interface IRetrieveInsightsResponse - * @property {Array.|null} [marketingDataInsights] RetrieveInsightsResponse marketingDataInsights - */ - - /** - * Constructs a new RetrieveInsightsResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a RetrieveInsightsResponse. - * @implements IRetrieveInsightsResponse - * @constructor - * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set - */ - function RetrieveInsightsResponse(properties) { - this.marketingDataInsights = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RetrieveInsightsResponse marketingDataInsights. - * @member {Array.} marketingDataInsights - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @instance - */ - RetrieveInsightsResponse.prototype.marketingDataInsights = $util.emptyArray; - - /** - * Creates a new RetrieveInsightsResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse instance - */ - RetrieveInsightsResponse.create = function create(properties) { - return new RetrieveInsightsResponse(properties); - }; - - /** - * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveInsightsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.marketingDataInsights != null && message.marketingDataInsights.length) - for (var i = 0; i < message.marketingDataInsights.length; ++i) - $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.encode(message.marketingDataInsights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetrieveInsightsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @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.RetrieveInsightsResponse} RetrieveInsightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveInsightsResponse.decode = function decode(reader, 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.RetrieveInsightsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.marketingDataInsights && message.marketingDataInsights.length)) - message.marketingDataInsights = []; - message.marketingDataInsights.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetrieveInsightsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetrieveInsightsResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetrieveInsightsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.marketingDataInsights != null && message.hasOwnProperty("marketingDataInsights")) { - if (!Array.isArray(message.marketingDataInsights)) - return "marketingDataInsights: array expected"; - for (var i = 0; i < message.marketingDataInsights.length; ++i) { - var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify(message.marketingDataInsights[i]); - if (error) - return "marketingDataInsights." + error; - } - } - return null; - }; - - /** - * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse - */ - RetrieveInsightsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse) - return object; - var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse(); - if (object.marketingDataInsights) { - if (!Array.isArray(object.marketingDataInsights)) - throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: array expected"); - message.marketingDataInsights = []; - for (var i = 0; i < object.marketingDataInsights.length; ++i) { - if (typeof object.marketingDataInsights[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: object expected"); - message.marketingDataInsights[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.fromObject(object.marketingDataInsights[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} message RetrieveInsightsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetrieveInsightsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.marketingDataInsights = []; - if (message.marketingDataInsights && message.marketingDataInsights.length) { - object.marketingDataInsights = []; - for (var j = 0; j < message.marketingDataInsights.length; ++j) - object.marketingDataInsights[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.toObject(message.marketingDataInsights[j], options); - } - return object; - }; - - /** - * Converts this RetrieveInsightsResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @instance - * @returns {Object.} JSON object - */ - RetrieveInsightsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetrieveInsightsResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetrieveInsightsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse"; - }; - - RetrieveInsightsResponse.MarketingDataInsight = (function() { - - /** - * Properties of a MarketingDataInsight. - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @interface IMarketingDataInsight - * @property {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null} [dimension] MarketingDataInsight dimension - * @property {Array.|null} [attributes] MarketingDataInsight attributes - */ - - /** - * Constructs a new MarketingDataInsight. - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse - * @classdesc Represents a MarketingDataInsight. - * @implements IMarketingDataInsight - * @constructor - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set - */ - function MarketingDataInsight(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MarketingDataInsight dimension. - * @member {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension} dimension - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @instance - */ - MarketingDataInsight.prototype.dimension = 0; - - /** - * MarketingDataInsight attributes. - * @member {Array.} attributes - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @instance - */ - MarketingDataInsight.prototype.attributes = $util.emptyArray; - - /** - * Creates a new MarketingDataInsight instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight instance - */ - MarketingDataInsight.create = function create(properties) { - return new MarketingDataInsight(properties); - }; - - /** - * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarketingDataInsight.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.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarketingDataInsight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MarketingDataInsight message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @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.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarketingDataInsight.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dimension = reader.int32(); - break; - } - case 2: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarketingDataInsight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MarketingDataInsight message. - * @function verify - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MarketingDataInsight.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 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - return null; - }; - - /** - * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight - */ - MarketingDataInsight.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight) - return object; - var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight(); - switch (object.dimension) { - default: - if (typeof object.dimension === "number") { - message.dimension = object.dimension; - break; - } - break; - case "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": - case 0: - message.dimension = 0; - break; - case "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": - case 1: - message.dimension = 1; - break; - case "AFFINITY_USER_INTEREST": - case 2: - message.dimension = 2; - break; - case "IN_MARKET_USER_INTEREST": - case 3: - message.dimension = 3; - break; - case "AGE_RANGE": - case 4: - message.dimension = 4; - break; - case "GENDER": - case 5: - message.dimension = 5; - break; - } - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: object expected"); - message.attributes[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.fromObject(object.attributes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} message MarketingDataInsight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MarketingDataInsight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) - object.dimension = options.enums === String ? "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED" : 0; - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = options.enums === String ? $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] === undefined ? message.dimension : $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] : message.dimension; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.toObject(message.attributes[j], options); - } - return object; - }; - - /** - * Converts this MarketingDataInsight to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @instance - * @returns {Object.} JSON object - */ - MarketingDataInsight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MarketingDataInsight - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MarketingDataInsight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight"; - }; - - /** - * AudienceInsightsDimension enum. - * @name google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension - * @enum {number} - * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED=0 AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED value - * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN=1 AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN value - * @property {number} AFFINITY_USER_INTEREST=2 AFFINITY_USER_INTEREST value - * @property {number} IN_MARKET_USER_INTEREST=3 IN_MARKET_USER_INTEREST value - * @property {number} AGE_RANGE=4 AGE_RANGE value - * @property {number} GENDER=5 GENDER value - */ - MarketingDataInsight.AudienceInsightsDimension = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN"] = 1; - values[valuesById[2] = "AFFINITY_USER_INTEREST"] = 2; - values[valuesById[3] = "IN_MARKET_USER_INTEREST"] = 3; - values[valuesById[4] = "AGE_RANGE"] = 4; - values[valuesById[5] = "GENDER"] = 5; - return values; - })(); - - MarketingDataInsight.MarketingDataInsightsAttribute = (function() { - - /** - * Properties of a MarketingDataInsightsAttribute. - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @interface IMarketingDataInsightsAttribute - * @property {number|Long|null} [userInterestId] MarketingDataInsightsAttribute userInterestId - * @property {number|null} [lift] MarketingDataInsightsAttribute lift - * @property {google.ads.datamanager.v1.AgeRange|null} [ageRange] MarketingDataInsightsAttribute ageRange - * @property {google.ads.datamanager.v1.Gender|null} [gender] MarketingDataInsightsAttribute gender - */ - - /** - * Constructs a new MarketingDataInsightsAttribute. - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight - * @classdesc Represents a MarketingDataInsightsAttribute. - * @implements IMarketingDataInsightsAttribute - * @constructor - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set - */ - function MarketingDataInsightsAttribute(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MarketingDataInsightsAttribute userInterestId. - * @member {number|Long|null|undefined} userInterestId - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @instance - */ - MarketingDataInsightsAttribute.prototype.userInterestId = null; - - /** - * MarketingDataInsightsAttribute lift. - * @member {number|null|undefined} lift - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @instance - */ - MarketingDataInsightsAttribute.prototype.lift = null; - - /** - * MarketingDataInsightsAttribute ageRange. - * @member {google.ads.datamanager.v1.AgeRange|null|undefined} ageRange - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @instance - */ - MarketingDataInsightsAttribute.prototype.ageRange = null; - - /** - * MarketingDataInsightsAttribute gender. - * @member {google.ads.datamanager.v1.Gender|null|undefined} gender - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @instance - */ - MarketingDataInsightsAttribute.prototype.gender = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_userInterestId", { - get: $util.oneOfGetter($oneOfFields = ["userInterestId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_lift", { - get: $util.oneOfGetter($oneOfFields = ["lift"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_ageRange", { - get: $util.oneOfGetter($oneOfFields = ["ageRange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_gender", { - get: $util.oneOfGetter($oneOfFields = ["gender"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MarketingDataInsightsAttribute instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute instance - */ - MarketingDataInsightsAttribute.create = function create(properties) { - return new MarketingDataInsightsAttribute(properties); - }; - - /** - * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarketingDataInsightsAttribute.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userInterestId != null && Object.hasOwnProperty.call(message, "userInterestId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.userInterestId); - if (message.lift != null && Object.hasOwnProperty.call(message, "lift")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.lift); - if (message.ageRange != null && Object.hasOwnProperty.call(message, "ageRange")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ageRange); - if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.gender); - return writer; - }; - - /** - * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarketingDataInsightsAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarketingDataInsightsAttribute.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userInterestId = reader.int64(); - break; - } - case 2: { - message.lift = reader.float(); - break; - } - case 3: { - message.ageRange = reader.int32(); - break; - } - case 4: { - message.gender = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarketingDataInsightsAttribute.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MarketingDataInsightsAttribute message. - * @function verify - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MarketingDataInsightsAttribute.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { - properties._userInterestId = 1; - if (!$util.isInteger(message.userInterestId) && !(message.userInterestId && $util.isInteger(message.userInterestId.low) && $util.isInteger(message.userInterestId.high))) - return "userInterestId: integer|Long expected"; - } - if (message.lift != null && message.hasOwnProperty("lift")) { - properties._lift = 1; - if (typeof message.lift !== "number") - return "lift: number expected"; - } - if (message.ageRange != null && message.hasOwnProperty("ageRange")) { - properties._ageRange = 1; - switch (message.ageRange) { - default: - return "ageRange: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message.gender != null && message.hasOwnProperty("gender")) { - properties._gender = 1; - switch (message.gender) { - default: - return "gender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute - */ - MarketingDataInsightsAttribute.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute) - return object; - var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); - if (object.userInterestId != null) - if ($util.Long) - (message.userInterestId = $util.Long.fromValue(object.userInterestId)).unsigned = false; - else if (typeof object.userInterestId === "string") - message.userInterestId = parseInt(object.userInterestId, 10); - else if (typeof object.userInterestId === "number") - message.userInterestId = object.userInterestId; - else if (typeof object.userInterestId === "object") - message.userInterestId = new $util.LongBits(object.userInterestId.low >>> 0, object.userInterestId.high >>> 0).toNumber(); - if (object.lift != null) - message.lift = Number(object.lift); - switch (object.ageRange) { - default: - if (typeof object.ageRange === "number") { - message.ageRange = object.ageRange; - break; - } - break; - case "AGE_RANGE_UNSPECIFIED": - case 0: - message.ageRange = 0; - break; - case "AGE_RANGE_UNKNOWN": - case 1: - message.ageRange = 1; - break; - case "AGE_RANGE_18_24": - case 2: - message.ageRange = 2; - break; - case "AGE_RANGE_25_34": - case 3: - message.ageRange = 3; - break; - case "AGE_RANGE_35_44": - case 4: - message.ageRange = 4; - break; - case "AGE_RANGE_45_54": - case 5: - message.ageRange = 5; - break; - case "AGE_RANGE_55_64": - case 6: - message.ageRange = 6; - break; - case "AGE_RANGE_65_UP": - case 7: - message.ageRange = 7; - break; - } - switch (object.gender) { - default: - if (typeof object.gender === "number") { - message.gender = object.gender; - break; - } - break; - case "GENDER_UNSPECIFIED": - case 0: - message.gender = 0; - break; - case "GENDER_UNKNOWN": - case 1: - message.gender = 1; - break; - case "GENDER_MALE": - case 2: - message.gender = 2; - break; - case "GENDER_FEMALE": - case 3: - message.gender = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} message MarketingDataInsightsAttribute - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MarketingDataInsightsAttribute.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { - if (typeof message.userInterestId === "number") - object.userInterestId = options.longs === String ? String(message.userInterestId) : message.userInterestId; - else - object.userInterestId = options.longs === String ? $util.Long.prototype.toString.call(message.userInterestId) : options.longs === Number ? new $util.LongBits(message.userInterestId.low >>> 0, message.userInterestId.high >>> 0).toNumber() : message.userInterestId; - if (options.oneofs) - object._userInterestId = "userInterestId"; - } - if (message.lift != null && message.hasOwnProperty("lift")) { - object.lift = options.json && !isFinite(message.lift) ? String(message.lift) : message.lift; - if (options.oneofs) - object._lift = "lift"; - } - if (message.ageRange != null && message.hasOwnProperty("ageRange")) { - object.ageRange = options.enums === String ? $root.google.ads.datamanager.v1.AgeRange[message.ageRange] === undefined ? message.ageRange : $root.google.ads.datamanager.v1.AgeRange[message.ageRange] : message.ageRange; - if (options.oneofs) - object._ageRange = "ageRange"; - } - if (message.gender != null && message.hasOwnProperty("gender")) { - object.gender = options.enums === String ? $root.google.ads.datamanager.v1.Gender[message.gender] === undefined ? message.gender : $root.google.ads.datamanager.v1.Gender[message.gender] : message.gender; - if (options.oneofs) - object._gender = "gender"; - } - return object; - }; - - /** - * Converts this MarketingDataInsightsAttribute to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @instance - * @returns {Object.} JSON object - */ - MarketingDataInsightsAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MarketingDataInsightsAttribute - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MarketingDataInsightsAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute"; - }; - - return MarketingDataInsightsAttribute; - })(); - - return MarketingDataInsight; - })(); - - return RetrieveInsightsResponse; - })(); - - v1.PartnerLinkService = (function() { - - /** - * Constructs a new PartnerLinkService service. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PartnerLinkService - * @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 PartnerLinkService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PartnerLinkService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PartnerLinkService; - - /** - * Creates new PartnerLinkService service using the specified rpc implementation. - * @function create - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @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 {PartnerLinkService} RPC service. Useful where requests and/or responses are streamed. - */ - PartnerLinkService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @typedef CreatePartnerLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.PartnerLink} [response] PartnerLink - */ - - /** - * Calls CreatePartnerLink. - * @function createPartnerLink - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object - * @param {google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback} callback Node-style callback called with the error, if any, and PartnerLink - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PartnerLinkService.prototype.createPartnerLink = function createPartnerLink(request, callback) { - return this.rpcCall(createPartnerLink, $root.google.ads.datamanager.v1.CreatePartnerLinkRequest, $root.google.ads.datamanager.v1.PartnerLink, request, callback); - }, "name", { value: "CreatePartnerLink" }); - - /** - * Calls CreatePartnerLink. - * @function createPartnerLink - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @typedef DeletePartnerLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePartnerLink. - * @function deletePartnerLink - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object - * @param {google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PartnerLinkService.prototype.deletePartnerLink = function deletePartnerLink(request, callback) { - return this.rpcCall(deletePartnerLink, $root.google.ads.datamanager.v1.DeletePartnerLinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePartnerLink" }); - - /** - * Calls DeletePartnerLink. - * @function deletePartnerLink - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @typedef SearchPartnerLinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} [response] SearchPartnerLinksResponse - */ - - /** - * Calls SearchPartnerLinks. - * @function searchPartnerLinks - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object - * @param {google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback} callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PartnerLinkService.prototype.searchPartnerLinks = function searchPartnerLinks(request, callback) { - return this.rpcCall(searchPartnerLinks, $root.google.ads.datamanager.v1.SearchPartnerLinksRequest, $root.google.ads.datamanager.v1.SearchPartnerLinksResponse, request, callback); - }, "name", { value: "SearchPartnerLinks" }); - - /** - * Calls SearchPartnerLinks. - * @function searchPartnerLinks - * @memberof google.ads.datamanager.v1.PartnerLinkService - * @instance - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PartnerLinkService; - })(); - - v1.CreatePartnerLinkRequest = (function() { - - /** - * Properties of a CreatePartnerLinkRequest. - * @memberof google.ads.datamanager.v1 - * @interface ICreatePartnerLinkRequest - * @property {string|null} [parent] CreatePartnerLinkRequest parent - * @property {google.ads.datamanager.v1.IPartnerLink|null} [partnerLink] CreatePartnerLinkRequest partnerLink - */ - - /** - * Constructs a new CreatePartnerLinkRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a CreatePartnerLinkRequest. - * @implements ICreatePartnerLinkRequest - * @constructor - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set - */ - function CreatePartnerLinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreatePartnerLinkRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @instance - */ - CreatePartnerLinkRequest.prototype.parent = ""; - - /** - * CreatePartnerLinkRequest partnerLink. - * @member {google.ads.datamanager.v1.IPartnerLink|null|undefined} partnerLink - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @instance - */ - CreatePartnerLinkRequest.prototype.partnerLink = null; - - /** - * Creates a new CreatePartnerLinkRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest instance - */ - CreatePartnerLinkRequest.create = function create(properties) { - return new CreatePartnerLinkRequest(properties); - }; - - /** - * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePartnerLinkRequest.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.partnerLink != null && Object.hasOwnProperty.call(message, "partnerLink")) - $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @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.CreatePartnerLinkRequest} CreatePartnerLinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePartnerLinkRequest.decode = function decode(reader, 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.CreatePartnerLinkRequest(); - 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.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePartnerLinkRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePartnerLinkRequest.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.partnerLink != null && message.hasOwnProperty("partnerLink")) { - var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLink); - if (error) - return "partnerLink." + error; - } - return null; - }; - - /** - * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest - */ - CreatePartnerLinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.CreatePartnerLinkRequest) - return object; - var message = new $root.google.ads.datamanager.v1.CreatePartnerLinkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.partnerLink != null) { - if (typeof object.partnerLink !== "object") - throw TypeError(".google.ads.datamanager.v1.CreatePartnerLinkRequest.partnerLink: object expected"); - message.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLink); - } - return message; - }; - - /** - * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.CreatePartnerLinkRequest} message CreatePartnerLinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePartnerLinkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.partnerLink = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.partnerLink != null && message.hasOwnProperty("partnerLink")) - object.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLink, options); - return object; - }; - - /** - * Converts this CreatePartnerLinkRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePartnerLinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePartnerLinkRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.CreatePartnerLinkRequest"; - }; - - return CreatePartnerLinkRequest; - })(); - - v1.DeletePartnerLinkRequest = (function() { - - /** - * Properties of a DeletePartnerLinkRequest. - * @memberof google.ads.datamanager.v1 - * @interface IDeletePartnerLinkRequest - * @property {string|null} [name] DeletePartnerLinkRequest name - */ - - /** - * Constructs a new DeletePartnerLinkRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a DeletePartnerLinkRequest. - * @implements IDeletePartnerLinkRequest - * @constructor - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set - */ - function DeletePartnerLinkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePartnerLinkRequest name. - * @member {string} name - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @instance - */ - DeletePartnerLinkRequest.prototype.name = ""; - - /** - * Creates a new DeletePartnerLinkRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest instance - */ - DeletePartnerLinkRequest.create = function create(properties) { - return new DeletePartnerLinkRequest(properties); - }; - - /** - * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @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.DeletePartnerLinkRequest} DeletePartnerLinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePartnerLinkRequest.decode = function decode(reader, 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.DeletePartnerLinkRequest(); - 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 DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePartnerLinkRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest - */ - DeletePartnerLinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.DeletePartnerLinkRequest) - return object; - var message = new $root.google.ads.datamanager.v1.DeletePartnerLinkRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {google.ads.datamanager.v1.DeletePartnerLinkRequest} message DeletePartnerLinkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePartnerLinkRequest.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 DeletePartnerLinkRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePartnerLinkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePartnerLinkRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.DeletePartnerLinkRequest"; - }; - - return DeletePartnerLinkRequest; - })(); - - v1.SearchPartnerLinksRequest = (function() { - - /** - * Properties of a SearchPartnerLinksRequest. - * @memberof google.ads.datamanager.v1 - * @interface ISearchPartnerLinksRequest - * @property {string|null} [parent] SearchPartnerLinksRequest parent - * @property {number|null} [pageSize] SearchPartnerLinksRequest pageSize - * @property {string|null} [pageToken] SearchPartnerLinksRequest pageToken - * @property {string|null} [filter] SearchPartnerLinksRequest filter - */ - - /** - * Constructs a new SearchPartnerLinksRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a SearchPartnerLinksRequest. - * @implements ISearchPartnerLinksRequest - * @constructor - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set - */ - function SearchPartnerLinksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchPartnerLinksRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @instance - */ - SearchPartnerLinksRequest.prototype.parent = ""; - - /** - * SearchPartnerLinksRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @instance - */ - SearchPartnerLinksRequest.prototype.pageSize = 0; - - /** - * SearchPartnerLinksRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @instance - */ - SearchPartnerLinksRequest.prototype.pageToken = ""; - - /** - * SearchPartnerLinksRequest filter. - * @member {string} filter - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @instance - */ - SearchPartnerLinksRequest.prototype.filter = ""; - - /** - * Creates a new SearchPartnerLinksRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest instance - */ - SearchPartnerLinksRequest.create = function create(properties) { - return new SearchPartnerLinksRequest(properties); - }; - - /** - * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchPartnerLinksRequest.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); - return writer; - }; - - /** - * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchPartnerLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @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.SearchPartnerLinksRequest} SearchPartnerLinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchPartnerLinksRequest.decode = function decode(reader, 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.SearchPartnerLinksRequest(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchPartnerLinksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchPartnerLinksRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchPartnerLinksRequest.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"; - return null; - }; - - /** - * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest - */ - SearchPartnerLinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksRequest) - return object; - var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {google.ads.datamanager.v1.SearchPartnerLinksRequest} message SearchPartnerLinksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchPartnerLinksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this SearchPartnerLinksRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @instance - * @returns {Object.} JSON object - */ - SearchPartnerLinksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchPartnerLinksRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchPartnerLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksRequest"; - }; - - return SearchPartnerLinksRequest; - })(); - - v1.SearchPartnerLinksResponse = (function() { - - /** - * Properties of a SearchPartnerLinksResponse. - * @memberof google.ads.datamanager.v1 - * @interface ISearchPartnerLinksResponse - * @property {Array.|null} [partnerLinks] SearchPartnerLinksResponse partnerLinks - * @property {string|null} [nextPageToken] SearchPartnerLinksResponse nextPageToken - */ - - /** - * Constructs a new SearchPartnerLinksResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a SearchPartnerLinksResponse. - * @implements ISearchPartnerLinksResponse - * @constructor - * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set - */ - function SearchPartnerLinksResponse(properties) { - this.partnerLinks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchPartnerLinksResponse partnerLinks. - * @member {Array.} partnerLinks - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @instance - */ - SearchPartnerLinksResponse.prototype.partnerLinks = $util.emptyArray; - - /** - * SearchPartnerLinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @instance - */ - SearchPartnerLinksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new SearchPartnerLinksResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse instance - */ - SearchPartnerLinksResponse.create = function create(properties) { - return new SearchPartnerLinksResponse(properties); - }; - - /** - * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchPartnerLinksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partnerLinks != null && message.partnerLinks.length) - for (var i = 0; i < message.partnerLinks.length; ++i) - $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLinks[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 SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchPartnerLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @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.SearchPartnerLinksResponse} SearchPartnerLinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchPartnerLinksResponse.decode = function decode(reader, 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.SearchPartnerLinksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.partnerLinks && message.partnerLinks.length)) - message.partnerLinks = []; - message.partnerLinks.push($root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchPartnerLinksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchPartnerLinksResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchPartnerLinksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partnerLinks != null && message.hasOwnProperty("partnerLinks")) { - if (!Array.isArray(message.partnerLinks)) - return "partnerLinks: array expected"; - for (var i = 0; i < message.partnerLinks.length; ++i) { - var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLinks[i]); - if (error) - return "partnerLinks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse - */ - SearchPartnerLinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksResponse) - return object; - var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksResponse(); - if (object.partnerLinks) { - if (!Array.isArray(object.partnerLinks)) - throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: array expected"); - message.partnerLinks = []; - for (var i = 0; i < object.partnerLinks.length; ++i) { - if (typeof object.partnerLinks[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: object expected"); - message.partnerLinks[i] = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLinks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} message SearchPartnerLinksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchPartnerLinksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.partnerLinks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.partnerLinks && message.partnerLinks.length) { - object.partnerLinks = []; - for (var j = 0; j < message.partnerLinks.length; ++j) - object.partnerLinks[j] = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLinks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this SearchPartnerLinksResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @instance - * @returns {Object.} JSON object - */ - SearchPartnerLinksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchPartnerLinksResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchPartnerLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksResponse"; - }; - - return SearchPartnerLinksResponse; - })(); - - v1.PartnerLink = (function() { - - /** - * Properties of a PartnerLink. - * @memberof google.ads.datamanager.v1 - * @interface IPartnerLink - * @property {string|null} [name] PartnerLink name - * @property {string|null} [partnerLinkId] PartnerLink partnerLinkId - * @property {google.ads.datamanager.v1.IProductAccount|null} [owningAccount] PartnerLink owningAccount - * @property {google.ads.datamanager.v1.IProductAccount|null} [partnerAccount] PartnerLink partnerAccount - */ - - /** - * Constructs a new PartnerLink. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PartnerLink. - * @implements IPartnerLink - * @constructor - * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set - */ - function PartnerLink(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PartnerLink name. - * @member {string} name - * @memberof google.ads.datamanager.v1.PartnerLink - * @instance - */ - PartnerLink.prototype.name = ""; - - /** - * PartnerLink partnerLinkId. - * @member {string} partnerLinkId - * @memberof google.ads.datamanager.v1.PartnerLink - * @instance - */ - PartnerLink.prototype.partnerLinkId = ""; - - /** - * PartnerLink owningAccount. - * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} owningAccount - * @memberof google.ads.datamanager.v1.PartnerLink - * @instance - */ - PartnerLink.prototype.owningAccount = null; - - /** - * PartnerLink partnerAccount. - * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} partnerAccount - * @memberof google.ads.datamanager.v1.PartnerLink - * @instance - */ - PartnerLink.prototype.partnerAccount = null; - - /** - * Creates a new PartnerLink instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink instance - */ - PartnerLink.create = function create(properties) { - return new PartnerLink(properties); - }; - - /** - * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartnerLink.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.partnerLinkId != null && Object.hasOwnProperty.call(message, "partnerLinkId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.partnerLinkId); - if (message.owningAccount != null && Object.hasOwnProperty.call(message, "owningAccount")) - $root.google.ads.datamanager.v1.ProductAccount.encode(message.owningAccount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.partnerAccount != null && Object.hasOwnProperty.call(message, "partnerAccount")) - $root.google.ads.datamanager.v1.ProductAccount.encode(message.partnerAccount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartnerLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PartnerLink message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.PartnerLink - * @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.PartnerLink} PartnerLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartnerLink.decode = function decode(reader, 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.PartnerLink(); - 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.partnerLinkId = reader.string(); - break; - } - case 3: { - message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); - break; - } - case 4: { - message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PartnerLink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartnerLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartnerLink message. - * @function verify - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartnerLink.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.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) - if (!$util.isString(message.partnerLinkId)) - return "partnerLinkId: string expected"; - if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) { - var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.owningAccount); - if (error) - return "owningAccount." + error; - } - if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) { - var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.partnerAccount); - if (error) - return "partnerAccount." + error; - } - return null; - }; - - /** - * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink - */ - PartnerLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.PartnerLink) - return object; - var message = new $root.google.ads.datamanager.v1.PartnerLink(); - if (object.name != null) - message.name = String(object.name); - if (object.partnerLinkId != null) - message.partnerLinkId = String(object.partnerLinkId); - if (object.owningAccount != null) { - if (typeof object.owningAccount !== "object") - throw TypeError(".google.ads.datamanager.v1.PartnerLink.owningAccount: object expected"); - message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.owningAccount); - } - if (object.partnerAccount != null) { - if (typeof object.partnerAccount !== "object") - throw TypeError(".google.ads.datamanager.v1.PartnerLink.partnerAccount: object expected"); - message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.partnerAccount); - } - return message; - }; - - /** - * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {google.ads.datamanager.v1.PartnerLink} message PartnerLink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartnerLink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.partnerLinkId = ""; - object.owningAccount = null; - object.partnerAccount = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) - object.partnerLinkId = message.partnerLinkId; - if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) - object.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.owningAccount, options); - if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) - object.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.partnerAccount, options); - return object; - }; - - /** - * Converts this PartnerLink to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.PartnerLink - * @instance - * @returns {Object.} JSON object - */ - PartnerLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PartnerLink - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.PartnerLink - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartnerLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerLink"; - }; - - return PartnerLink; - })(); - - v1.UserList = (function() { - - /** - * Properties of a UserList. - * @memberof google.ads.datamanager.v1 - * @interface IUserList - * @property {string|null} [name] UserList name - * @property {number|Long|null} [id] UserList id - * @property {boolean|null} [readOnly] UserList readOnly - * @property {string|null} [displayName] UserList displayName - * @property {string|null} [description] UserList description - * @property {google.ads.datamanager.v1.UserList.MembershipStatus|null} [membershipStatus] UserList membershipStatus - * @property {string|null} [integrationCode] UserList integrationCode - * @property {google.protobuf.IDuration|null} [membershipDuration] UserList membershipDuration - * @property {google.ads.datamanager.v1.UserList.ClosingReason|null} [closingReason] UserList closingReason - * @property {google.ads.datamanager.v1.UserList.AccessReason|null} [accessReason] UserList accessReason - * @property {google.ads.datamanager.v1.UserList.AccessStatus|null} [accountAccessStatus] UserList accountAccessStatus - * @property {google.ads.datamanager.v1.ISizeInfo|null} [sizeInfo] UserList sizeInfo - * @property {google.ads.datamanager.v1.ITargetNetworkInfo|null} [targetNetworkInfo] UserList targetNetworkInfo - * @property {google.ads.datamanager.v1.IIngestedUserListInfo|null} [ingestedUserListInfo] UserList ingestedUserListInfo - */ - - /** - * Constructs a new UserList. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserList. - * @implements IUserList - * @constructor - * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set - */ - function UserList(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserList name. - * @member {string} name - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.name = ""; - - /** - * UserList id. - * @member {number|Long} id - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserList readOnly. - * @member {boolean} readOnly - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.readOnly = false; - - /** - * UserList displayName. - * @member {string|null|undefined} displayName - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.displayName = null; - - /** - * UserList description. - * @member {string|null|undefined} description - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.description = null; - - /** - * UserList membershipStatus. - * @member {google.ads.datamanager.v1.UserList.MembershipStatus|null|undefined} membershipStatus - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.membershipStatus = null; - - /** - * UserList integrationCode. - * @member {string|null|undefined} integrationCode - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.integrationCode = null; - - /** - * UserList membershipDuration. - * @member {google.protobuf.IDuration|null|undefined} membershipDuration - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.membershipDuration = null; - - /** - * UserList closingReason. - * @member {google.ads.datamanager.v1.UserList.ClosingReason|null|undefined} closingReason - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.closingReason = null; - - /** - * UserList accessReason. - * @member {google.ads.datamanager.v1.UserList.AccessReason} accessReason - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.accessReason = 0; - - /** - * UserList accountAccessStatus. - * @member {google.ads.datamanager.v1.UserList.AccessStatus|null|undefined} accountAccessStatus - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.accountAccessStatus = null; - - /** - * UserList sizeInfo. - * @member {google.ads.datamanager.v1.ISizeInfo|null|undefined} sizeInfo - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.sizeInfo = null; - - /** - * UserList targetNetworkInfo. - * @member {google.ads.datamanager.v1.ITargetNetworkInfo|null|undefined} targetNetworkInfo - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.targetNetworkInfo = null; - - /** - * UserList ingestedUserListInfo. - * @member {google.ads.datamanager.v1.IIngestedUserListInfo|null|undefined} ingestedUserListInfo - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - UserList.prototype.ingestedUserListInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_displayName", { - get: $util.oneOfGetter($oneOfFields = ["displayName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_membershipStatus", { - get: $util.oneOfGetter($oneOfFields = ["membershipStatus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_integrationCode", { - get: $util.oneOfGetter($oneOfFields = ["integrationCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_closingReason", { - get: $util.oneOfGetter($oneOfFields = ["closingReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserList.prototype, "_accountAccessStatus", { - get: $util.oneOfGetter($oneOfFields = ["accountAccessStatus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UserList userListInfo. - * @member {"ingestedUserListInfo"|undefined} userListInfo - * @memberof google.ads.datamanager.v1.UserList - * @instance - */ - Object.defineProperty(UserList.prototype, "userListInfo", { - get: $util.oneOfGetter($oneOfFields = ["ingestedUserListInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UserList instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserList} UserList instance - */ - UserList.create = function create(properties) { - return new UserList(properties); - }; - - /** - * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserList.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); - if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.readOnly); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.membershipStatus != null && Object.hasOwnProperty.call(message, "membershipStatus")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.membershipStatus); - if (message.integrationCode != null && Object.hasOwnProperty.call(message, "integrationCode")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.integrationCode); - if (message.membershipDuration != null && Object.hasOwnProperty.call(message, "membershipDuration")) - $root.google.protobuf.Duration.encode(message.membershipDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.closingReason != null && Object.hasOwnProperty.call(message, "closingReason")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.closingReason); - if (message.accessReason != null && Object.hasOwnProperty.call(message, "accessReason")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.accessReason); - if (message.accountAccessStatus != null && Object.hasOwnProperty.call(message, "accountAccessStatus")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.accountAccessStatus); - if (message.sizeInfo != null && Object.hasOwnProperty.call(message, "sizeInfo")) - $root.google.ads.datamanager.v1.SizeInfo.encode(message.sizeInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.targetNetworkInfo != null && Object.hasOwnProperty.call(message, "targetNetworkInfo")) - $root.google.ads.datamanager.v1.TargetNetworkInfo.encode(message.targetNetworkInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.ingestedUserListInfo != null && Object.hasOwnProperty.call(message, "ingestedUserListInfo")) - $root.google.ads.datamanager.v1.IngestedUserListInfo.encode(message.ingestedUserListInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserList message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserList - * @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.UserList} UserList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserList.decode = function decode(reader, 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.UserList(); - 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.id = reader.int64(); - break; - } - case 3: { - message.readOnly = reader.bool(); - break; - } - case 4: { - message.displayName = reader.string(); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.membershipStatus = reader.int32(); - break; - } - case 7: { - message.integrationCode = reader.string(); - break; - } - case 8: { - message.membershipDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 9: { - message.closingReason = reader.int32(); - break; - } - case 10: { - message.accessReason = reader.int32(); - break; - } - case 11: { - message.accountAccessStatus = reader.int32(); - break; - } - case 12: { - message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserList} UserList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserList message. - * @function verify - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserList.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.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - if (typeof message.readOnly !== "boolean") - return "readOnly: boolean 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { - properties._membershipStatus = 1; - switch (message.membershipStatus) { - default: - return "membershipStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { - properties._integrationCode = 1; - if (!$util.isString(message.integrationCode)) - return "integrationCode: string expected"; - } - if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) { - var error = $root.google.protobuf.Duration.verify(message.membershipDuration); - if (error) - return "membershipDuration." + error; - } - if (message.closingReason != null && message.hasOwnProperty("closingReason")) { - properties._closingReason = 1; - switch (message.closingReason) { - default: - return "closingReason: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.accessReason != null && message.hasOwnProperty("accessReason")) - switch (message.accessReason) { - default: - return "accessReason: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { - properties._accountAccessStatus = 1; - switch (message.accountAccessStatus) { - default: - return "accountAccessStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) { - var error = $root.google.ads.datamanager.v1.SizeInfo.verify(message.sizeInfo); - if (error) - return "sizeInfo." + error; - } - if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) { - var error = $root.google.ads.datamanager.v1.TargetNetworkInfo.verify(message.targetNetworkInfo); - if (error) - return "targetNetworkInfo." + error; - } - if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { - properties.userListInfo = 1; - { - var error = $root.google.ads.datamanager.v1.IngestedUserListInfo.verify(message.ingestedUserListInfo); - if (error) - return "ingestedUserListInfo." + error; - } - } - return null; - }; - - /** - * Creates a UserList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserList} UserList - */ - UserList.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserList) - return object; - var message = new $root.google.ads.datamanager.v1.UserList(); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - if (object.readOnly != null) - message.readOnly = Boolean(object.readOnly); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.membershipStatus) { - default: - if (typeof object.membershipStatus === "number") { - message.membershipStatus = object.membershipStatus; - break; - } - break; - case "MEMBERSHIP_STATUS_UNSPECIFIED": - case 0: - message.membershipStatus = 0; - break; - case "OPEN": - case 1: - message.membershipStatus = 1; - break; - case "CLOSED": - case 2: - message.membershipStatus = 2; - break; - } - if (object.integrationCode != null) - message.integrationCode = String(object.integrationCode); - if (object.membershipDuration != null) { - if (typeof object.membershipDuration !== "object") - throw TypeError(".google.ads.datamanager.v1.UserList.membershipDuration: object expected"); - message.membershipDuration = $root.google.protobuf.Duration.fromObject(object.membershipDuration); - } - switch (object.closingReason) { - default: - if (typeof object.closingReason === "number") { - message.closingReason = object.closingReason; - break; - } - break; - case "CLOSING_REASON_UNSPECIFIED": - case 0: - message.closingReason = 0; - break; - case "UNUSED": - case 1: - message.closingReason = 1; - break; - } - switch (object.accessReason) { - default: - if (typeof object.accessReason === "number") { - message.accessReason = object.accessReason; - break; - } - break; - case "ACCESS_REASON_UNSPECIFIED": - case 0: - message.accessReason = 0; - break; - case "OWNED": - case 1: - message.accessReason = 1; - break; - case "SHARED": - case 2: - message.accessReason = 2; - break; - case "LICENSED": - case 3: - message.accessReason = 3; - break; - case "SUBSCRIBED": - case 4: - message.accessReason = 4; - break; - case "AFFILIATED": - case 5: - message.accessReason = 5; - break; - } - switch (object.accountAccessStatus) { - default: - if (typeof object.accountAccessStatus === "number") { - message.accountAccessStatus = object.accountAccessStatus; - break; - } - break; - case "ACCESS_STATUS_UNSPECIFIED": - case 0: - message.accountAccessStatus = 0; - break; - case "ENABLED": - case 1: - message.accountAccessStatus = 1; - break; - case "DISABLED": - case 2: - message.accountAccessStatus = 2; - break; - } - if (object.sizeInfo != null) { - if (typeof object.sizeInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.UserList.sizeInfo: object expected"); - message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.fromObject(object.sizeInfo); - } - if (object.targetNetworkInfo != null) { - if (typeof object.targetNetworkInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.UserList.targetNetworkInfo: object expected"); - message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.fromObject(object.targetNetworkInfo); - } - if (object.ingestedUserListInfo != null) { - if (typeof object.ingestedUserListInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.UserList.ingestedUserListInfo: object expected"); - message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.fromObject(object.ingestedUserListInfo); - } - return message; - }; - - /** - * Creates a plain object from a UserList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {google.ads.datamanager.v1.UserList} message UserList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserList.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.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.readOnly = false; - object.membershipDuration = null; - object.accessReason = options.enums === String ? "ACCESS_REASON_UNSPECIFIED" : 0; - object.sizeInfo = null; - object.targetNetworkInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - object.readOnly = message.readOnly; - 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { - object.membershipStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] === undefined ? message.membershipStatus : $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] : message.membershipStatus; - if (options.oneofs) - object._membershipStatus = "membershipStatus"; - } - if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { - object.integrationCode = message.integrationCode; - if (options.oneofs) - object._integrationCode = "integrationCode"; - } - if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) - object.membershipDuration = $root.google.protobuf.Duration.toObject(message.membershipDuration, options); - if (message.closingReason != null && message.hasOwnProperty("closingReason")) { - object.closingReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] === undefined ? message.closingReason : $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] : message.closingReason; - if (options.oneofs) - object._closingReason = "closingReason"; - } - if (message.accessReason != null && message.hasOwnProperty("accessReason")) - object.accessReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] === undefined ? message.accessReason : $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] : message.accessReason; - if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { - object.accountAccessStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] === undefined ? message.accountAccessStatus : $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] : message.accountAccessStatus; - if (options.oneofs) - object._accountAccessStatus = "accountAccessStatus"; - } - if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) - object.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.toObject(message.sizeInfo, options); - if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) - object.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.toObject(message.targetNetworkInfo, options); - if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { - object.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.toObject(message.ingestedUserListInfo, options); - if (options.oneofs) - object.userListInfo = "ingestedUserListInfo"; - } - return object; - }; - - /** - * Converts this UserList to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserList - * @instance - * @returns {Object.} JSON object - */ - UserList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserList - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserList"; - }; - - /** - * MembershipStatus enum. - * @name google.ads.datamanager.v1.UserList.MembershipStatus - * @enum {number} - * @property {number} MEMBERSHIP_STATUS_UNSPECIFIED=0 MEMBERSHIP_STATUS_UNSPECIFIED value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - UserList.MembershipStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MEMBERSHIP_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * ClosingReason enum. - * @name google.ads.datamanager.v1.UserList.ClosingReason - * @enum {number} - * @property {number} CLOSING_REASON_UNSPECIFIED=0 CLOSING_REASON_UNSPECIFIED value - * @property {number} UNUSED=1 UNUSED value - */ - UserList.ClosingReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLOSING_REASON_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNUSED"] = 1; - return values; - })(); - - /** - * AccessReason enum. - * @name google.ads.datamanager.v1.UserList.AccessReason - * @enum {number} - * @property {number} ACCESS_REASON_UNSPECIFIED=0 ACCESS_REASON_UNSPECIFIED value - * @property {number} OWNED=1 OWNED value - * @property {number} SHARED=2 SHARED value - * @property {number} LICENSED=3 LICENSED value - * @property {number} SUBSCRIBED=4 SUBSCRIBED value - * @property {number} AFFILIATED=5 AFFILIATED value - */ - UserList.AccessReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_REASON_UNSPECIFIED"] = 0; - values[valuesById[1] = "OWNED"] = 1; - values[valuesById[2] = "SHARED"] = 2; - values[valuesById[3] = "LICENSED"] = 3; - values[valuesById[4] = "SUBSCRIBED"] = 4; - values[valuesById[5] = "AFFILIATED"] = 5; - return values; - })(); - - /** - * AccessStatus enum. - * @name google.ads.datamanager.v1.UserList.AccessStatus - * @enum {number} - * @property {number} ACCESS_STATUS_UNSPECIFIED=0 ACCESS_STATUS_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - */ - UserList.AccessStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - return UserList; - })(); - - v1.SizeInfo = (function() { - - /** - * Properties of a SizeInfo. - * @memberof google.ads.datamanager.v1 - * @interface ISizeInfo - * @property {number|Long|null} [displayNetworkMembersCount] SizeInfo displayNetworkMembersCount - * @property {number|Long|null} [searchNetworkMembersCount] SizeInfo searchNetworkMembersCount - */ - - /** - * Constructs a new SizeInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a SizeInfo. - * @implements ISizeInfo - * @constructor - * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set - */ - function SizeInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SizeInfo displayNetworkMembersCount. - * @member {number|Long} displayNetworkMembersCount - * @memberof google.ads.datamanager.v1.SizeInfo - * @instance - */ - SizeInfo.prototype.displayNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SizeInfo searchNetworkMembersCount. - * @member {number|Long} searchNetworkMembersCount - * @memberof google.ads.datamanager.v1.SizeInfo - * @instance - */ - SizeInfo.prototype.searchNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SizeInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo instance - */ - SizeInfo.create = function create(properties) { - return new SizeInfo(properties); - }; - - /** - * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SizeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayNetworkMembersCount != null && Object.hasOwnProperty.call(message, "displayNetworkMembersCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.displayNetworkMembersCount); - if (message.searchNetworkMembersCount != null && Object.hasOwnProperty.call(message, "searchNetworkMembersCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.searchNetworkMembersCount); - return writer; - }; - - /** - * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SizeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SizeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.SizeInfo - * @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.SizeInfo} SizeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SizeInfo.decode = function decode(reader, 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.SizeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.displayNetworkMembersCount = reader.int64(); - break; - } - case 2: { - message.searchNetworkMembersCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SizeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SizeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SizeInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SizeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) - if (!$util.isInteger(message.displayNetworkMembersCount) && !(message.displayNetworkMembersCount && $util.isInteger(message.displayNetworkMembersCount.low) && $util.isInteger(message.displayNetworkMembersCount.high))) - return "displayNetworkMembersCount: integer|Long expected"; - if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) - if (!$util.isInteger(message.searchNetworkMembersCount) && !(message.searchNetworkMembersCount && $util.isInteger(message.searchNetworkMembersCount.low) && $util.isInteger(message.searchNetworkMembersCount.high))) - return "searchNetworkMembersCount: integer|Long expected"; - return null; - }; - - /** - * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo - */ - SizeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.SizeInfo) - return object; - var message = new $root.google.ads.datamanager.v1.SizeInfo(); - if (object.displayNetworkMembersCount != null) - if ($util.Long) - (message.displayNetworkMembersCount = $util.Long.fromValue(object.displayNetworkMembersCount)).unsigned = false; - else if (typeof object.displayNetworkMembersCount === "string") - message.displayNetworkMembersCount = parseInt(object.displayNetworkMembersCount, 10); - else if (typeof object.displayNetworkMembersCount === "number") - message.displayNetworkMembersCount = object.displayNetworkMembersCount; - else if (typeof object.displayNetworkMembersCount === "object") - message.displayNetworkMembersCount = new $util.LongBits(object.displayNetworkMembersCount.low >>> 0, object.displayNetworkMembersCount.high >>> 0).toNumber(); - if (object.searchNetworkMembersCount != null) - if ($util.Long) - (message.searchNetworkMembersCount = $util.Long.fromValue(object.searchNetworkMembersCount)).unsigned = false; - else if (typeof object.searchNetworkMembersCount === "string") - message.searchNetworkMembersCount = parseInt(object.searchNetworkMembersCount, 10); - else if (typeof object.searchNetworkMembersCount === "number") - message.searchNetworkMembersCount = object.searchNetworkMembersCount; - else if (typeof object.searchNetworkMembersCount === "object") - message.searchNetworkMembersCount = new $util.LongBits(object.searchNetworkMembersCount.low >>> 0, object.searchNetworkMembersCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {google.ads.datamanager.v1.SizeInfo} message SizeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SizeInfo.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.displayNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.displayNetworkMembersCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.searchNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.searchNetworkMembersCount = options.longs === String ? "0" : 0; - } - if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) - if (typeof message.displayNetworkMembersCount === "number") - object.displayNetworkMembersCount = options.longs === String ? String(message.displayNetworkMembersCount) : message.displayNetworkMembersCount; - else - object.displayNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.displayNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.displayNetworkMembersCount.low >>> 0, message.displayNetworkMembersCount.high >>> 0).toNumber() : message.displayNetworkMembersCount; - if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) - if (typeof message.searchNetworkMembersCount === "number") - object.searchNetworkMembersCount = options.longs === String ? String(message.searchNetworkMembersCount) : message.searchNetworkMembersCount; - else - object.searchNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.searchNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.searchNetworkMembersCount.low >>> 0, message.searchNetworkMembersCount.high >>> 0).toNumber() : message.searchNetworkMembersCount; - return object; - }; - - /** - * Converts this SizeInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.SizeInfo - * @instance - * @returns {Object.} JSON object - */ - SizeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SizeInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.SizeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SizeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.SizeInfo"; - }; - - return SizeInfo; - })(); - - v1.TargetNetworkInfo = (function() { - - /** - * Properties of a TargetNetworkInfo. - * @memberof google.ads.datamanager.v1 - * @interface ITargetNetworkInfo - * @property {boolean|null} [eligibleForDisplay] TargetNetworkInfo eligibleForDisplay - * @property {boolean|null} [eligibleForSearch] TargetNetworkInfo eligibleForSearch - */ - - /** - * Constructs a new TargetNetworkInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a TargetNetworkInfo. - * @implements ITargetNetworkInfo - * @constructor - * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set - */ - function TargetNetworkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetNetworkInfo eligibleForDisplay. - * @member {boolean} eligibleForDisplay - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @instance - */ - TargetNetworkInfo.prototype.eligibleForDisplay = false; - - /** - * TargetNetworkInfo eligibleForSearch. - * @member {boolean|null|undefined} eligibleForSearch - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @instance - */ - TargetNetworkInfo.prototype.eligibleForSearch = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TargetNetworkInfo.prototype, "_eligibleForSearch", { - get: $util.oneOfGetter($oneOfFields = ["eligibleForSearch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetNetworkInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo instance - */ - TargetNetworkInfo.create = function create(properties) { - return new TargetNetworkInfo(properties); - }; - - /** - * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetNetworkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eligibleForDisplay != null && Object.hasOwnProperty.call(message, "eligibleForDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.eligibleForDisplay); - if (message.eligibleForSearch != null && Object.hasOwnProperty.call(message, "eligibleForSearch")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eligibleForSearch); - return writer; - }; - - /** - * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetNetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetNetworkInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @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.TargetNetworkInfo} TargetNetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetNetworkInfo.decode = function decode(reader, 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.TargetNetworkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.eligibleForDisplay = reader.bool(); - break; - } - case 2: { - message.eligibleForSearch = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetNetworkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetNetworkInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetNetworkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) - if (typeof message.eligibleForDisplay !== "boolean") - return "eligibleForDisplay: boolean expected"; - if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { - properties._eligibleForSearch = 1; - if (typeof message.eligibleForSearch !== "boolean") - return "eligibleForSearch: boolean expected"; - } - return null; - }; - - /** - * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo - */ - TargetNetworkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.TargetNetworkInfo) - return object; - var message = new $root.google.ads.datamanager.v1.TargetNetworkInfo(); - if (object.eligibleForDisplay != null) - message.eligibleForDisplay = Boolean(object.eligibleForDisplay); - if (object.eligibleForSearch != null) - message.eligibleForSearch = Boolean(object.eligibleForSearch); - return message; - }; - - /** - * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {google.ads.datamanager.v1.TargetNetworkInfo} message TargetNetworkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetNetworkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.eligibleForDisplay = false; - if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) - object.eligibleForDisplay = message.eligibleForDisplay; - if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { - object.eligibleForSearch = message.eligibleForSearch; - if (options.oneofs) - object._eligibleForSearch = "eligibleForSearch"; - } - return object; - }; - - /** - * Converts this TargetNetworkInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @instance - * @returns {Object.} JSON object - */ - TargetNetworkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetNetworkInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.TargetNetworkInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetNetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.TargetNetworkInfo"; - }; - - return TargetNetworkInfo; - })(); - - v1.IngestedUserListInfo = (function() { - - /** - * Properties of an IngestedUserListInfo. - * @memberof google.ads.datamanager.v1 - * @interface IIngestedUserListInfo - * @property {Array.|null} [uploadKeyTypes] IngestedUserListInfo uploadKeyTypes - * @property {google.ads.datamanager.v1.IContactIdInfo|null} [contactIdInfo] IngestedUserListInfo contactIdInfo - * @property {google.ads.datamanager.v1.IMobileIdInfo|null} [mobileIdInfo] IngestedUserListInfo mobileIdInfo - * @property {google.ads.datamanager.v1.IUserIdInfo|null} [userIdInfo] IngestedUserListInfo userIdInfo - * @property {google.ads.datamanager.v1.IPairIdInfo|null} [pairIdInfo] IngestedUserListInfo pairIdInfo - * @property {google.ads.datamanager.v1.IPseudonymousIdInfo|null} [pseudonymousIdInfo] IngestedUserListInfo pseudonymousIdInfo - * @property {google.ads.datamanager.v1.IPartnerAudienceInfo|null} [partnerAudienceInfo] IngestedUserListInfo partnerAudienceInfo - */ - - /** - * Constructs a new IngestedUserListInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an IngestedUserListInfo. - * @implements IIngestedUserListInfo - * @constructor - * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set - */ - function IngestedUserListInfo(properties) { - this.uploadKeyTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IngestedUserListInfo uploadKeyTypes. - * @member {Array.} uploadKeyTypes - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.uploadKeyTypes = $util.emptyArray; - - /** - * IngestedUserListInfo contactIdInfo. - * @member {google.ads.datamanager.v1.IContactIdInfo|null|undefined} contactIdInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.contactIdInfo = null; - - /** - * IngestedUserListInfo mobileIdInfo. - * @member {google.ads.datamanager.v1.IMobileIdInfo|null|undefined} mobileIdInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.mobileIdInfo = null; - - /** - * IngestedUserListInfo userIdInfo. - * @member {google.ads.datamanager.v1.IUserIdInfo|null|undefined} userIdInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.userIdInfo = null; - - /** - * IngestedUserListInfo pairIdInfo. - * @member {google.ads.datamanager.v1.IPairIdInfo|null|undefined} pairIdInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.pairIdInfo = null; - - /** - * IngestedUserListInfo pseudonymousIdInfo. - * @member {google.ads.datamanager.v1.IPseudonymousIdInfo|null|undefined} pseudonymousIdInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.pseudonymousIdInfo = null; - - /** - * IngestedUserListInfo partnerAudienceInfo. - * @member {google.ads.datamanager.v1.IPartnerAudienceInfo|null|undefined} partnerAudienceInfo - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - */ - IngestedUserListInfo.prototype.partnerAudienceInfo = null; - - /** - * Creates a new IngestedUserListInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo instance - */ - IngestedUserListInfo.create = function create(properties) { - return new IngestedUserListInfo(properties); - }; - - /** - * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestedUserListInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uploadKeyTypes != null && message.uploadKeyTypes.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.uploadKeyTypes.length; ++i) - writer.int32(message.uploadKeyTypes[i]); - writer.ldelim(); - } - if (message.contactIdInfo != null && Object.hasOwnProperty.call(message, "contactIdInfo")) - $root.google.ads.datamanager.v1.ContactIdInfo.encode(message.contactIdInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.mobileIdInfo != null && Object.hasOwnProperty.call(message, "mobileIdInfo")) - $root.google.ads.datamanager.v1.MobileIdInfo.encode(message.mobileIdInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.userIdInfo != null && Object.hasOwnProperty.call(message, "userIdInfo")) - $root.google.ads.datamanager.v1.UserIdInfo.encode(message.userIdInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pairIdInfo != null && Object.hasOwnProperty.call(message, "pairIdInfo")) - $root.google.ads.datamanager.v1.PairIdInfo.encode(message.pairIdInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pseudonymousIdInfo != null && Object.hasOwnProperty.call(message, "pseudonymousIdInfo")) - $root.google.ads.datamanager.v1.PseudonymousIdInfo.encode(message.pseudonymousIdInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.partnerAudienceInfo != null && Object.hasOwnProperty.call(message, "partnerAudienceInfo")) - $root.google.ads.datamanager.v1.PartnerAudienceInfo.encode(message.partnerAudienceInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestedUserListInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IngestedUserListInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @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.IngestedUserListInfo} IngestedUserListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestedUserListInfo.decode = function decode(reader, 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.IngestedUserListInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.uploadKeyTypes && message.uploadKeyTypes.length)) - message.uploadKeyTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.uploadKeyTypes.push(reader.int32()); - } else - message.uploadKeyTypes.push(reader.int32()); - break; - } - case 2: { - message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestedUserListInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IngestedUserListInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestedUserListInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uploadKeyTypes != null && message.hasOwnProperty("uploadKeyTypes")) { - if (!Array.isArray(message.uploadKeyTypes)) - return "uploadKeyTypes: array expected"; - for (var i = 0; i < message.uploadKeyTypes.length; ++i) - switch (message.uploadKeyTypes[i]) { - default: - return "uploadKeyTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) { - var error = $root.google.ads.datamanager.v1.ContactIdInfo.verify(message.contactIdInfo); - if (error) - return "contactIdInfo." + error; - } - if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) { - var error = $root.google.ads.datamanager.v1.MobileIdInfo.verify(message.mobileIdInfo); - if (error) - return "mobileIdInfo." + error; - } - if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) { - var error = $root.google.ads.datamanager.v1.UserIdInfo.verify(message.userIdInfo); - if (error) - return "userIdInfo." + error; - } - if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) { - var error = $root.google.ads.datamanager.v1.PairIdInfo.verify(message.pairIdInfo); - if (error) - return "pairIdInfo." + error; - } - if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) { - var error = $root.google.ads.datamanager.v1.PseudonymousIdInfo.verify(message.pseudonymousIdInfo); - if (error) - return "pseudonymousIdInfo." + error; - } - if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) { - var error = $root.google.ads.datamanager.v1.PartnerAudienceInfo.verify(message.partnerAudienceInfo); - if (error) - return "partnerAudienceInfo." + error; - } - return null; - }; - - /** - * Creates an IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo - */ - IngestedUserListInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.IngestedUserListInfo) - return object; - var message = new $root.google.ads.datamanager.v1.IngestedUserListInfo(); - if (object.uploadKeyTypes) { - if (!Array.isArray(object.uploadKeyTypes)) - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.uploadKeyTypes: array expected"); - message.uploadKeyTypes = []; - for (var i = 0; i < object.uploadKeyTypes.length; ++i) - switch (object.uploadKeyTypes[i]) { - default: - if (typeof object.uploadKeyTypes[i] === "number") { - message.uploadKeyTypes[i] = object.uploadKeyTypes[i]; - break; - } - case "UPLOAD_KEY_TYPE_UNSPECIFIED": - case 0: - message.uploadKeyTypes[i] = 0; - break; - case "CONTACT_ID": - case 1: - message.uploadKeyTypes[i] = 1; - break; - case "MOBILE_ID": - case 2: - message.uploadKeyTypes[i] = 2; - break; - case "USER_ID": - case 3: - message.uploadKeyTypes[i] = 3; - break; - case "PAIR_ID": - case 4: - message.uploadKeyTypes[i] = 4; - break; - case "PSEUDONYMOUS_ID": - case 5: - message.uploadKeyTypes[i] = 5; - break; - } - } - if (object.contactIdInfo != null) { - if (typeof object.contactIdInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.contactIdInfo: object expected"); - message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.fromObject(object.contactIdInfo); - } - if (object.mobileIdInfo != null) { - if (typeof object.mobileIdInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.mobileIdInfo: object expected"); - message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.fromObject(object.mobileIdInfo); - } - if (object.userIdInfo != null) { - if (typeof object.userIdInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.userIdInfo: object expected"); - message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.fromObject(object.userIdInfo); - } - if (object.pairIdInfo != null) { - if (typeof object.pairIdInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pairIdInfo: object expected"); - message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.fromObject(object.pairIdInfo); - } - if (object.pseudonymousIdInfo != null) { - if (typeof object.pseudonymousIdInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pseudonymousIdInfo: object expected"); - message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.fromObject(object.pseudonymousIdInfo); - } - if (object.partnerAudienceInfo != null) { - if (typeof object.partnerAudienceInfo !== "object") - throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.partnerAudienceInfo: object expected"); - message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.fromObject(object.partnerAudienceInfo); - } - return message; - }; - - /** - * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {google.ads.datamanager.v1.IngestedUserListInfo} message IngestedUserListInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestedUserListInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uploadKeyTypes = []; - if (options.defaults) { - object.contactIdInfo = null; - object.mobileIdInfo = null; - object.userIdInfo = null; - object.pairIdInfo = null; - object.pseudonymousIdInfo = null; - object.partnerAudienceInfo = null; - } - if (message.uploadKeyTypes && message.uploadKeyTypes.length) { - object.uploadKeyTypes = []; - for (var j = 0; j < message.uploadKeyTypes.length; ++j) - object.uploadKeyTypes[j] = options.enums === String ? $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] === undefined ? message.uploadKeyTypes[j] : $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] : message.uploadKeyTypes[j]; - } - if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) - object.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.toObject(message.contactIdInfo, options); - if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) - object.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.toObject(message.mobileIdInfo, options); - if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) - object.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.toObject(message.userIdInfo, options); - if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) - object.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.toObject(message.pairIdInfo, options); - if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) - object.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.toObject(message.pseudonymousIdInfo, options); - if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) - object.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.toObject(message.partnerAudienceInfo, options); - return object; - }; - - /** - * Converts this IngestedUserListInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @instance - * @returns {Object.} JSON object - */ - IngestedUserListInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IngestedUserListInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.IngestedUserListInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestedUserListInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.IngestedUserListInfo"; - }; - - /** - * UploadKeyType enum. - * @name google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType - * @enum {number} - * @property {number} UPLOAD_KEY_TYPE_UNSPECIFIED=0 UPLOAD_KEY_TYPE_UNSPECIFIED value - * @property {number} CONTACT_ID=1 CONTACT_ID value - * @property {number} MOBILE_ID=2 MOBILE_ID value - * @property {number} USER_ID=3 USER_ID value - * @property {number} PAIR_ID=4 PAIR_ID value - * @property {number} PSEUDONYMOUS_ID=5 PSEUDONYMOUS_ID value - */ - IngestedUserListInfo.UploadKeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPLOAD_KEY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONTACT_ID"] = 1; - values[valuesById[2] = "MOBILE_ID"] = 2; - values[valuesById[3] = "USER_ID"] = 3; - values[valuesById[4] = "PAIR_ID"] = 4; - values[valuesById[5] = "PSEUDONYMOUS_ID"] = 5; - return values; - })(); - - return IngestedUserListInfo; - })(); - - v1.ContactIdInfo = (function() { - - /** - * Properties of a ContactIdInfo. - * @memberof google.ads.datamanager.v1 - * @interface IContactIdInfo - * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] ContactIdInfo dataSourceType - * @property {number|null} [matchRatePercentage] ContactIdInfo matchRatePercentage - */ - - /** - * Constructs a new ContactIdInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ContactIdInfo. - * @implements IContactIdInfo - * @constructor - * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set - */ - function ContactIdInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContactIdInfo dataSourceType. - * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @instance - */ - ContactIdInfo.prototype.dataSourceType = null; - - /** - * ContactIdInfo matchRatePercentage. - * @member {number} matchRatePercentage - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @instance - */ - ContactIdInfo.prototype.matchRatePercentage = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ContactIdInfo.prototype, "_dataSourceType", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ContactIdInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo instance - */ - ContactIdInfo.create = function create(properties) { - return new ContactIdInfo(properties); - }; - - /** - * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactIdInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); - if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchRatePercentage); - return writer; - }; - - /** - * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactIdInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContactIdInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @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.ContactIdInfo} ContactIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactIdInfo.decode = function decode(reader, 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.ContactIdInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dataSourceType = reader.int32(); - break; - } - case 2: { - message.matchRatePercentage = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactIdInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContactIdInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContactIdInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - properties._dataSourceType = 1; - switch (message.dataSourceType) { - default: - return "dataSourceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) - if (!$util.isInteger(message.matchRatePercentage)) - return "matchRatePercentage: integer expected"; - return null; - }; - - /** - * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo - */ - ContactIdInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ContactIdInfo) - return object; - var message = new $root.google.ads.datamanager.v1.ContactIdInfo(); - switch (object.dataSourceType) { - default: - if (typeof object.dataSourceType === "number") { - message.dataSourceType = object.dataSourceType; - break; - } - break; - case "DATA_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.dataSourceType = 0; - break; - case "DATA_SOURCE_TYPE_FIRST_PARTY": - case 1: - message.dataSourceType = 1; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": - case 2: - message.dataSourceType = 2; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": - case 3: - message.dataSourceType = 3; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": - case 4: - message.dataSourceType = 4; - break; - } - if (object.matchRatePercentage != null) - message.matchRatePercentage = object.matchRatePercentage | 0; - return message; - }; - - /** - * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {google.ads.datamanager.v1.ContactIdInfo} message ContactIdInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContactIdInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.matchRatePercentage = 0; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; - if (options.oneofs) - object._dataSourceType = "dataSourceType"; - } - if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) - object.matchRatePercentage = message.matchRatePercentage; - return object; - }; - - /** - * Converts this ContactIdInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @instance - * @returns {Object.} JSON object - */ - ContactIdInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContactIdInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ContactIdInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContactIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ContactIdInfo"; - }; - - return ContactIdInfo; - })(); - - v1.MobileIdInfo = (function() { - - /** - * Properties of a MobileIdInfo. - * @memberof google.ads.datamanager.v1 - * @interface IMobileIdInfo - * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] MobileIdInfo dataSourceType - * @property {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null} [keySpace] MobileIdInfo keySpace - * @property {string|null} [appId] MobileIdInfo appId - */ - - /** - * Constructs a new MobileIdInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a MobileIdInfo. - * @implements IMobileIdInfo - * @constructor - * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set - */ - function MobileIdInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MobileIdInfo dataSourceType. - * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @instance - */ - MobileIdInfo.prototype.dataSourceType = null; - - /** - * MobileIdInfo keySpace. - * @member {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null|undefined} keySpace - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @instance - */ - MobileIdInfo.prototype.keySpace = null; - - /** - * MobileIdInfo appId. - * @member {string|null|undefined} appId - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @instance - */ - MobileIdInfo.prototype.appId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MobileIdInfo.prototype, "_dataSourceType", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MobileIdInfo.prototype, "_keySpace", { - get: $util.oneOfGetter($oneOfFields = ["keySpace"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MobileIdInfo.prototype, "_appId", { - get: $util.oneOfGetter($oneOfFields = ["appId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MobileIdInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo instance - */ - MobileIdInfo.create = function create(properties) { - return new MobileIdInfo(properties); - }; - - /** - * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MobileIdInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); - if (message.keySpace != null && Object.hasOwnProperty.call(message, "keySpace")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keySpace); - if (message.appId != null && Object.hasOwnProperty.call(message, "appId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.appId); - return writer; - }; - - /** - * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MobileIdInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MobileIdInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @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.MobileIdInfo} MobileIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MobileIdInfo.decode = function decode(reader, 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.MobileIdInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dataSourceType = reader.int32(); - break; - } - case 2: { - message.keySpace = reader.int32(); - break; - } - case 3: { - message.appId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MobileIdInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MobileIdInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MobileIdInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - properties._dataSourceType = 1; - switch (message.dataSourceType) { - default: - return "dataSourceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.keySpace != null && message.hasOwnProperty("keySpace")) { - properties._keySpace = 1; - switch (message.keySpace) { - default: - return "keySpace: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.appId != null && message.hasOwnProperty("appId")) { - properties._appId = 1; - if (!$util.isString(message.appId)) - return "appId: string expected"; - } - return null; - }; - - /** - * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo - */ - MobileIdInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.MobileIdInfo) - return object; - var message = new $root.google.ads.datamanager.v1.MobileIdInfo(); - switch (object.dataSourceType) { - default: - if (typeof object.dataSourceType === "number") { - message.dataSourceType = object.dataSourceType; - break; - } - break; - case "DATA_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.dataSourceType = 0; - break; - case "DATA_SOURCE_TYPE_FIRST_PARTY": - case 1: - message.dataSourceType = 1; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": - case 2: - message.dataSourceType = 2; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": - case 3: - message.dataSourceType = 3; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": - case 4: - message.dataSourceType = 4; - break; - } - switch (object.keySpace) { - default: - if (typeof object.keySpace === "number") { - message.keySpace = object.keySpace; - break; - } - break; - case "KEY_SPACE_UNSPECIFIED": - case 0: - message.keySpace = 0; - break; - case "IOS": - case 1: - message.keySpace = 1; - break; - case "ANDROID": - case 2: - message.keySpace = 2; - break; - } - if (object.appId != null) - message.appId = String(object.appId); - return message; - }; - - /** - * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {google.ads.datamanager.v1.MobileIdInfo} message MobileIdInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MobileIdInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; - if (options.oneofs) - object._dataSourceType = "dataSourceType"; - } - if (message.keySpace != null && message.hasOwnProperty("keySpace")) { - object.keySpace = options.enums === String ? $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] === undefined ? message.keySpace : $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] : message.keySpace; - if (options.oneofs) - object._keySpace = "keySpace"; - } - if (message.appId != null && message.hasOwnProperty("appId")) { - object.appId = message.appId; - if (options.oneofs) - object._appId = "appId"; - } - return object; - }; - - /** - * Converts this MobileIdInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @instance - * @returns {Object.} JSON object - */ - MobileIdInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MobileIdInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.MobileIdInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MobileIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.MobileIdInfo"; - }; - - /** - * KeySpace enum. - * @name google.ads.datamanager.v1.MobileIdInfo.KeySpace - * @enum {number} - * @property {number} KEY_SPACE_UNSPECIFIED=0 KEY_SPACE_UNSPECIFIED value - * @property {number} IOS=1 IOS value - * @property {number} ANDROID=2 ANDROID value - */ - MobileIdInfo.KeySpace = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_SPACE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IOS"] = 1; - values[valuesById[2] = "ANDROID"] = 2; - return values; - })(); - - return MobileIdInfo; - })(); - - v1.UserIdInfo = (function() { - - /** - * Properties of a UserIdInfo. - * @memberof google.ads.datamanager.v1 - * @interface IUserIdInfo - * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] UserIdInfo dataSourceType - */ - - /** - * Constructs a new UserIdInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserIdInfo. - * @implements IUserIdInfo - * @constructor - * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set - */ - function UserIdInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserIdInfo dataSourceType. - * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType - * @memberof google.ads.datamanager.v1.UserIdInfo - * @instance - */ - UserIdInfo.prototype.dataSourceType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserIdInfo.prototype, "_dataSourceType", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UserIdInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo instance - */ - UserIdInfo.create = function create(properties) { - return new UserIdInfo(properties); - }; - - /** - * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserIdInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); - return writer; - }; - - /** - * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserIdInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserIdInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserIdInfo - * @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.UserIdInfo} UserIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserIdInfo.decode = function decode(reader, 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.UserIdInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.dataSourceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserIdInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserIdInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserIdInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - properties._dataSourceType = 1; - switch (message.dataSourceType) { - default: - return "dataSourceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - return null; - }; - - /** - * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo - */ - UserIdInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserIdInfo) - return object; - var message = new $root.google.ads.datamanager.v1.UserIdInfo(); - switch (object.dataSourceType) { - default: - if (typeof object.dataSourceType === "number") { - message.dataSourceType = object.dataSourceType; - break; - } - break; - case "DATA_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.dataSourceType = 0; - break; - case "DATA_SOURCE_TYPE_FIRST_PARTY": - case 1: - message.dataSourceType = 1; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": - case 2: - message.dataSourceType = 2; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": - case 3: - message.dataSourceType = 3; - break; - case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": - case 4: - message.dataSourceType = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {google.ads.datamanager.v1.UserIdInfo} message UserIdInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserIdInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { - object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; - if (options.oneofs) - object._dataSourceType = "dataSourceType"; - } - return object; - }; - - /** - * Converts this UserIdInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserIdInfo - * @instance - * @returns {Object.} JSON object - */ - UserIdInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserIdInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserIdInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdInfo"; - }; - - return UserIdInfo; - })(); - - v1.PairIdInfo = (function() { - - /** - * Properties of a PairIdInfo. - * @memberof google.ads.datamanager.v1 - * @interface IPairIdInfo - * @property {number|Long|null} [publisherId] PairIdInfo publisherId - * @property {string|null} [publisherName] PairIdInfo publisherName - * @property {number|null} [matchRatePercentage] PairIdInfo matchRatePercentage - * @property {number|Long|null} [advertiserIdentifierCount] PairIdInfo advertiserIdentifierCount - * @property {string|null} [cleanRoomIdentifier] PairIdInfo cleanRoomIdentifier - */ - - /** - * Constructs a new PairIdInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PairIdInfo. - * @implements IPairIdInfo - * @constructor - * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set - */ - function PairIdInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PairIdInfo publisherId. - * @member {number|Long|null|undefined} publisherId - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - */ - PairIdInfo.prototype.publisherId = null; - - /** - * PairIdInfo publisherName. - * @member {string|null|undefined} publisherName - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - */ - PairIdInfo.prototype.publisherName = null; - - /** - * PairIdInfo matchRatePercentage. - * @member {number} matchRatePercentage - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - */ - PairIdInfo.prototype.matchRatePercentage = 0; - - /** - * PairIdInfo advertiserIdentifierCount. - * @member {number|Long} advertiserIdentifierCount - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - */ - PairIdInfo.prototype.advertiserIdentifierCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PairIdInfo cleanRoomIdentifier. - * @member {string|null|undefined} cleanRoomIdentifier - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - */ - PairIdInfo.prototype.cleanRoomIdentifier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PairIdInfo.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PairIdInfo.prototype, "_publisherName", { - get: $util.oneOfGetter($oneOfFields = ["publisherName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PairIdInfo.prototype, "_cleanRoomIdentifier", { - get: $util.oneOfGetter($oneOfFields = ["cleanRoomIdentifier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PairIdInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo instance - */ - PairIdInfo.create = function create(properties) { - return new PairIdInfo(properties); - }; - - /** - * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PairIdInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.publisherId); - if (message.publisherName != null && Object.hasOwnProperty.call(message, "publisherName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.publisherName); - if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.matchRatePercentage); - if (message.advertiserIdentifierCount != null && Object.hasOwnProperty.call(message, "advertiserIdentifierCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.advertiserIdentifierCount); - if (message.cleanRoomIdentifier != null && Object.hasOwnProperty.call(message, "cleanRoomIdentifier")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.cleanRoomIdentifier); - return writer; - }; - - /** - * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PairIdInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PairIdInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.PairIdInfo - * @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.PairIdInfo} PairIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PairIdInfo.decode = function decode(reader, 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.PairIdInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.int64(); - break; - } - case 2: { - message.publisherName = reader.string(); - break; - } - case 3: { - message.matchRatePercentage = reader.int32(); - break; - } - case 4: { - message.advertiserIdentifierCount = reader.int64(); - break; - } - case 5: { - message.cleanRoomIdentifier = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PairIdInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PairIdInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PairIdInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId) && !(message.publisherId && $util.isInteger(message.publisherId.low) && $util.isInteger(message.publisherId.high))) - return "publisherId: integer|Long expected"; - } - if (message.publisherName != null && message.hasOwnProperty("publisherName")) { - properties._publisherName = 1; - if (!$util.isString(message.publisherName)) - return "publisherName: string expected"; - } - if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) - if (!$util.isInteger(message.matchRatePercentage)) - return "matchRatePercentage: integer expected"; - if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) - if (!$util.isInteger(message.advertiserIdentifierCount) && !(message.advertiserIdentifierCount && $util.isInteger(message.advertiserIdentifierCount.low) && $util.isInteger(message.advertiserIdentifierCount.high))) - return "advertiserIdentifierCount: integer|Long expected"; - if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { - properties._cleanRoomIdentifier = 1; - if (!$util.isString(message.cleanRoomIdentifier)) - return "cleanRoomIdentifier: string expected"; - } - return null; - }; - - /** - * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo - */ - PairIdInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.PairIdInfo) - return object; - var message = new $root.google.ads.datamanager.v1.PairIdInfo(); - if (object.publisherId != null) - if ($util.Long) - (message.publisherId = $util.Long.fromValue(object.publisherId)).unsigned = false; - else if (typeof object.publisherId === "string") - message.publisherId = parseInt(object.publisherId, 10); - else if (typeof object.publisherId === "number") - message.publisherId = object.publisherId; - else if (typeof object.publisherId === "object") - message.publisherId = new $util.LongBits(object.publisherId.low >>> 0, object.publisherId.high >>> 0).toNumber(); - if (object.publisherName != null) - message.publisherName = String(object.publisherName); - if (object.matchRatePercentage != null) - message.matchRatePercentage = object.matchRatePercentage | 0; - if (object.advertiserIdentifierCount != null) - if ($util.Long) - (message.advertiserIdentifierCount = $util.Long.fromValue(object.advertiserIdentifierCount)).unsigned = false; - else if (typeof object.advertiserIdentifierCount === "string") - message.advertiserIdentifierCount = parseInt(object.advertiserIdentifierCount, 10); - else if (typeof object.advertiserIdentifierCount === "number") - message.advertiserIdentifierCount = object.advertiserIdentifierCount; - else if (typeof object.advertiserIdentifierCount === "object") - message.advertiserIdentifierCount = new $util.LongBits(object.advertiserIdentifierCount.low >>> 0, object.advertiserIdentifierCount.high >>> 0).toNumber(); - if (object.cleanRoomIdentifier != null) - message.cleanRoomIdentifier = String(object.cleanRoomIdentifier); - return message; - }; - - /** - * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {google.ads.datamanager.v1.PairIdInfo} message PairIdInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PairIdInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchRatePercentage = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.advertiserIdentifierCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.advertiserIdentifierCount = options.longs === String ? "0" : 0; - } - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - if (typeof message.publisherId === "number") - object.publisherId = options.longs === String ? String(message.publisherId) : message.publisherId; - else - object.publisherId = options.longs === String ? $util.Long.prototype.toString.call(message.publisherId) : options.longs === Number ? new $util.LongBits(message.publisherId.low >>> 0, message.publisherId.high >>> 0).toNumber() : message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.publisherName != null && message.hasOwnProperty("publisherName")) { - object.publisherName = message.publisherName; - if (options.oneofs) - object._publisherName = "publisherName"; - } - if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) - object.matchRatePercentage = message.matchRatePercentage; - if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) - if (typeof message.advertiserIdentifierCount === "number") - object.advertiserIdentifierCount = options.longs === String ? String(message.advertiserIdentifierCount) : message.advertiserIdentifierCount; - else - object.advertiserIdentifierCount = options.longs === String ? $util.Long.prototype.toString.call(message.advertiserIdentifierCount) : options.longs === Number ? new $util.LongBits(message.advertiserIdentifierCount.low >>> 0, message.advertiserIdentifierCount.high >>> 0).toNumber() : message.advertiserIdentifierCount; - if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { - object.cleanRoomIdentifier = message.cleanRoomIdentifier; - if (options.oneofs) - object._cleanRoomIdentifier = "cleanRoomIdentifier"; - } - return object; - }; - - /** - * Converts this PairIdInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.PairIdInfo - * @instance - * @returns {Object.} JSON object - */ - PairIdInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PairIdInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.PairIdInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PairIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.PairIdInfo"; - }; - - return PairIdInfo; - })(); - - v1.PartnerAudienceInfo = (function() { - - /** - * Properties of a PartnerAudienceInfo. - * @memberof google.ads.datamanager.v1 - * @interface IPartnerAudienceInfo - * @property {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null} [partnerAudienceSource] PartnerAudienceInfo partnerAudienceSource - * @property {string|null} [commercePartner] PartnerAudienceInfo commercePartner - */ - - /** - * Constructs a new PartnerAudienceInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PartnerAudienceInfo. - * @implements IPartnerAudienceInfo - * @constructor - * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set - */ - function PartnerAudienceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PartnerAudienceInfo partnerAudienceSource. - * @member {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null|undefined} partnerAudienceSource - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @instance - */ - PartnerAudienceInfo.prototype.partnerAudienceSource = null; - - /** - * PartnerAudienceInfo commercePartner. - * @member {string|null|undefined} commercePartner - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @instance - */ - PartnerAudienceInfo.prototype.commercePartner = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PartnerAudienceInfo.prototype, "_partnerAudienceSource", { - get: $util.oneOfGetter($oneOfFields = ["partnerAudienceSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PartnerAudienceInfo.prototype, "_commercePartner", { - get: $util.oneOfGetter($oneOfFields = ["commercePartner"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PartnerAudienceInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo instance - */ - PartnerAudienceInfo.create = function create(properties) { - return new PartnerAudienceInfo(properties); - }; - - /** - * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartnerAudienceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partnerAudienceSource != null && Object.hasOwnProperty.call(message, "partnerAudienceSource")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partnerAudienceSource); - if (message.commercePartner != null && Object.hasOwnProperty.call(message, "commercePartner")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.commercePartner); - return writer; - }; - - /** - * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartnerAudienceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PartnerAudienceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @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.PartnerAudienceInfo} PartnerAudienceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartnerAudienceInfo.decode = function decode(reader, 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.PartnerAudienceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.partnerAudienceSource = reader.int32(); - break; - } - case 2: { - message.commercePartner = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartnerAudienceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartnerAudienceInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartnerAudienceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { - properties._partnerAudienceSource = 1; - switch (message.partnerAudienceSource) { - default: - return "partnerAudienceSource: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { - properties._commercePartner = 1; - if (!$util.isString(message.commercePartner)) - return "commercePartner: string expected"; - } - return null; - }; - - /** - * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo - */ - PartnerAudienceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.PartnerAudienceInfo) - return object; - var message = new $root.google.ads.datamanager.v1.PartnerAudienceInfo(); - switch (object.partnerAudienceSource) { - default: - if (typeof object.partnerAudienceSource === "number") { - message.partnerAudienceSource = object.partnerAudienceSource; - break; - } - break; - case "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": - case 0: - message.partnerAudienceSource = 0; - break; - case "COMMERCE_AUDIENCE": - case 1: - message.partnerAudienceSource = 1; - break; - case "LINEAR_TV_AUDIENCE": - case 2: - message.partnerAudienceSource = 2; - break; - case "AGENCY_PROVIDER_AUDIENCE": - case 3: - message.partnerAudienceSource = 3; - break; - } - if (object.commercePartner != null) - message.commercePartner = String(object.commercePartner); - return message; - }; - - /** - * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {google.ads.datamanager.v1.PartnerAudienceInfo} message PartnerAudienceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartnerAudienceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { - object.partnerAudienceSource = options.enums === String ? $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] === undefined ? message.partnerAudienceSource : $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] : message.partnerAudienceSource; - if (options.oneofs) - object._partnerAudienceSource = "partnerAudienceSource"; - } - if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { - object.commercePartner = message.commercePartner; - if (options.oneofs) - object._commercePartner = "commercePartner"; - } - return object; - }; - - /** - * Converts this PartnerAudienceInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @instance - * @returns {Object.} JSON object - */ - PartnerAudienceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PartnerAudienceInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.PartnerAudienceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartnerAudienceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerAudienceInfo"; - }; - - /** - * PartnerAudienceSource enum. - * @name google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource - * @enum {number} - * @property {number} PARTNER_AUDIENCE_SOURCE_UNSPECIFIED=0 PARTNER_AUDIENCE_SOURCE_UNSPECIFIED value - * @property {number} COMMERCE_AUDIENCE=1 COMMERCE_AUDIENCE value - * @property {number} LINEAR_TV_AUDIENCE=2 LINEAR_TV_AUDIENCE value - * @property {number} AGENCY_PROVIDER_AUDIENCE=3 AGENCY_PROVIDER_AUDIENCE value - */ - PartnerAudienceInfo.PartnerAudienceSource = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMMERCE_AUDIENCE"] = 1; - values[valuesById[2] = "LINEAR_TV_AUDIENCE"] = 2; - values[valuesById[3] = "AGENCY_PROVIDER_AUDIENCE"] = 3; - return values; - })(); - - return PartnerAudienceInfo; - })(); - - v1.PseudonymousIdInfo = (function() { - - /** - * Properties of a PseudonymousIdInfo. - * @memberof google.ads.datamanager.v1 - * @interface IPseudonymousIdInfo - * @property {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null} [syncStatus] PseudonymousIdInfo syncStatus - * @property {number|Long|null} [billableRecordCount] PseudonymousIdInfo billableRecordCount - */ - - /** - * Constructs a new PseudonymousIdInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a PseudonymousIdInfo. - * @implements IPseudonymousIdInfo - * @constructor - * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set - */ - function PseudonymousIdInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PseudonymousIdInfo syncStatus. - * @member {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null|undefined} syncStatus - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @instance - */ - PseudonymousIdInfo.prototype.syncStatus = null; - - /** - * PseudonymousIdInfo billableRecordCount. - * @member {number|Long|null|undefined} billableRecordCount - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @instance - */ - PseudonymousIdInfo.prototype.billableRecordCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PseudonymousIdInfo.prototype, "_syncStatus", { - get: $util.oneOfGetter($oneOfFields = ["syncStatus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(PseudonymousIdInfo.prototype, "_billableRecordCount", { - get: $util.oneOfGetter($oneOfFields = ["billableRecordCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PseudonymousIdInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo instance - */ - PseudonymousIdInfo.create = function create(properties) { - return new PseudonymousIdInfo(properties); - }; - - /** - * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PseudonymousIdInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.syncStatus != null && Object.hasOwnProperty.call(message, "syncStatus")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncStatus); - if (message.billableRecordCount != null && Object.hasOwnProperty.call(message, "billableRecordCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.billableRecordCount); - return writer; - }; - - /** - * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PseudonymousIdInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PseudonymousIdInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @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.PseudonymousIdInfo} PseudonymousIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PseudonymousIdInfo.decode = function decode(reader, 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.PseudonymousIdInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.syncStatus = reader.int32(); - break; - } - case 2: { - message.billableRecordCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PseudonymousIdInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PseudonymousIdInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PseudonymousIdInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { - properties._syncStatus = 1; - switch (message.syncStatus) { - default: - return "syncStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { - properties._billableRecordCount = 1; - if (!$util.isInteger(message.billableRecordCount) && !(message.billableRecordCount && $util.isInteger(message.billableRecordCount.low) && $util.isInteger(message.billableRecordCount.high))) - return "billableRecordCount: integer|Long expected"; - } - return null; - }; - - /** - * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo - */ - PseudonymousIdInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.PseudonymousIdInfo) - return object; - var message = new $root.google.ads.datamanager.v1.PseudonymousIdInfo(); - switch (object.syncStatus) { - default: - if (typeof object.syncStatus === "number") { - message.syncStatus = object.syncStatus; - break; - } - break; - case "SYNC_STATUS_UNSPECIFIED": - case 0: - message.syncStatus = 0; - break; - case "CREATED": - case 1: - message.syncStatus = 1; - break; - case "READY_FOR_USE": - case 2: - message.syncStatus = 2; - break; - case "FAILED": - case 3: - message.syncStatus = 3; - break; - } - if (object.billableRecordCount != null) - if ($util.Long) - (message.billableRecordCount = $util.Long.fromValue(object.billableRecordCount)).unsigned = false; - else if (typeof object.billableRecordCount === "string") - message.billableRecordCount = parseInt(object.billableRecordCount, 10); - else if (typeof object.billableRecordCount === "number") - message.billableRecordCount = object.billableRecordCount; - else if (typeof object.billableRecordCount === "object") - message.billableRecordCount = new $util.LongBits(object.billableRecordCount.low >>> 0, object.billableRecordCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {google.ads.datamanager.v1.PseudonymousIdInfo} message PseudonymousIdInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PseudonymousIdInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { - object.syncStatus = options.enums === String ? $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] === undefined ? message.syncStatus : $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] : message.syncStatus; - if (options.oneofs) - object._syncStatus = "syncStatus"; - } - if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { - if (typeof message.billableRecordCount === "number") - object.billableRecordCount = options.longs === String ? String(message.billableRecordCount) : message.billableRecordCount; - else - object.billableRecordCount = options.longs === String ? $util.Long.prototype.toString.call(message.billableRecordCount) : options.longs === Number ? new $util.LongBits(message.billableRecordCount.low >>> 0, message.billableRecordCount.high >>> 0).toNumber() : message.billableRecordCount; - if (options.oneofs) - object._billableRecordCount = "billableRecordCount"; - } - return object; - }; - - /** - * Converts this PseudonymousIdInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @instance - * @returns {Object.} JSON object - */ - PseudonymousIdInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PseudonymousIdInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.PseudonymousIdInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PseudonymousIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.PseudonymousIdInfo"; - }; - - /** - * SyncStatus enum. - * @name google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus - * @enum {number} - * @property {number} SYNC_STATUS_UNSPECIFIED=0 SYNC_STATUS_UNSPECIFIED value - * @property {number} CREATED=1 CREATED value - * @property {number} READY_FOR_USE=2 READY_FOR_USE value - * @property {number} FAILED=3 FAILED value - */ - PseudonymousIdInfo.SyncStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SYNC_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATED"] = 1; - values[valuesById[2] = "READY_FOR_USE"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return PseudonymousIdInfo; - })(); - - /** - * DataSourceType enum. - * @name google.ads.datamanager.v1.DataSourceType - * @enum {number} - * @property {number} DATA_SOURCE_TYPE_UNSPECIFIED=0 DATA_SOURCE_TYPE_UNSPECIFIED value - * @property {number} DATA_SOURCE_TYPE_FIRST_PARTY=1 DATA_SOURCE_TYPE_FIRST_PARTY value - * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU=2 DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU value - * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE=3 DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE value - * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA=4 DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA value - */ - v1.DataSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_SOURCE_TYPE_FIRST_PARTY"] = 1; - values[valuesById[2] = "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU"] = 2; - values[valuesById[3] = "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE"] = 3; - values[valuesById[4] = "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"] = 4; - return values; - })(); - - v1.UserListDirectLicense = (function() { - - /** - * Properties of a UserListDirectLicense. - * @memberof google.ads.datamanager.v1 - * @interface IUserListDirectLicense - * @property {string|null} [name] UserListDirectLicense name - * @property {number|Long|null} [userListId] UserListDirectLicense userListId - * @property {string|null} [userListDisplayName] UserListDirectLicense userListDisplayName - * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListDirectLicense clientAccountType - * @property {number|Long|null} [clientAccountId] UserListDirectLicense clientAccountId - * @property {string|null} [clientAccountDisplayName] UserListDirectLicense clientAccountDisplayName - * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListDirectLicense status - * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListDirectLicense pricing - * @property {Array.|null} [historicalPricings] UserListDirectLicense historicalPricings - * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListDirectLicense metrics - */ - - /** - * Constructs a new UserListDirectLicense. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListDirectLicense. - * @implements IUserListDirectLicense - * @constructor - * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set - */ - function UserListDirectLicense(properties) { - this.historicalPricings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserListDirectLicense name. - * @member {string} name - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.name = ""; - - /** - * UserListDirectLicense userListId. - * @member {number|Long|null|undefined} userListId - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.userListId = null; - - /** - * UserListDirectLicense userListDisplayName. - * @member {string} userListDisplayName - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.userListDisplayName = ""; - - /** - * UserListDirectLicense clientAccountType. - * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType|null|undefined} clientAccountType - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.clientAccountType = null; - - /** - * UserListDirectLicense clientAccountId. - * @member {number|Long|null|undefined} clientAccountId - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.clientAccountId = null; - - /** - * UserListDirectLicense clientAccountDisplayName. - * @member {string} clientAccountDisplayName - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.clientAccountDisplayName = ""; - - /** - * UserListDirectLicense status. - * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.status = null; - - /** - * UserListDirectLicense pricing. - * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.pricing = null; - - /** - * UserListDirectLicense historicalPricings. - * @member {Array.} historicalPricings - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.historicalPricings = $util.emptyArray; - - /** - * UserListDirectLicense metrics. - * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - */ - UserListDirectLicense.prototype.metrics = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListDirectLicense.prototype, "_userListId", { - get: $util.oneOfGetter($oneOfFields = ["userListId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountType", { - get: $util.oneOfGetter($oneOfFields = ["clientAccountType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountId", { - get: $util.oneOfGetter($oneOfFields = ["clientAccountId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListDirectLicense.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UserListDirectLicense instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense instance - */ - UserListDirectLicense.create = function create(properties) { - return new UserListDirectLicense(properties); - }; - - /** - * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListDirectLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); - if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); - if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clientAccountType); - if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientAccountId); - if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.clientAccountDisplayName); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.status); - if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.historicalPricings != null && message.historicalPricings.length) - for (var i = 0; i < message.historicalPricings.length; ++i) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListDirectLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserListDirectLicense message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @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.UserListDirectLicense} UserListDirectLicense - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListDirectLicense.decode = function decode(reader, 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.UserListDirectLicense(); - 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.userListId = reader.int64(); - break; - } - case 3: { - message.userListDisplayName = reader.string(); - break; - } - case 4: { - message.clientAccountType = reader.int32(); - break; - } - case 5: { - message.clientAccountId = reader.int64(); - break; - } - case 6: { - message.clientAccountDisplayName = reader.string(); - break; - } - case 7: { - message.status = reader.int32(); - break; - } - case 8: { - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.historicalPricings && message.historicalPricings.length)) - message.historicalPricings = []; - message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); - break; - } - case 10: { - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListDirectLicense.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserListDirectLicense message. - * @function verify - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserListDirectLicense.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.userListId != null && message.hasOwnProperty("userListId")) { - properties._userListId = 1; - if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) - return "userListId: integer|Long expected"; - } - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - if (!$util.isString(message.userListDisplayName)) - return "userListDisplayName: string expected"; - if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { - properties._clientAccountType = 1; - switch (message.clientAccountType) { - default: - return "clientAccountType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { - properties._clientAccountId = 1; - if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) - return "clientAccountId: integer|Long expected"; - } - if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) - if (!$util.isString(message.clientAccountDisplayName)) - return "clientAccountDisplayName: 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.pricing != null && message.hasOwnProperty("pricing")) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); - if (error) - return "pricing." + error; - } - if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { - if (!Array.isArray(message.historicalPricings)) - return "historicalPricings: array expected"; - for (var i = 0; i < message.historicalPricings.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); - if (error) - return "historicalPricings." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); - if (error) - return "metrics." + error; - } - return null; - }; - - /** - * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense - */ - UserListDirectLicense.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserListDirectLicense) - return object; - var message = new $root.google.ads.datamanager.v1.UserListDirectLicense(); - if (object.name != null) - message.name = String(object.name); - if (object.userListId != null) - if ($util.Long) - (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; - else if (typeof object.userListId === "string") - message.userListId = parseInt(object.userListId, 10); - else if (typeof object.userListId === "number") - message.userListId = object.userListId; - else if (typeof object.userListId === "object") - message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); - if (object.userListDisplayName != null) - message.userListDisplayName = String(object.userListDisplayName); - switch (object.clientAccountType) { - default: - if (typeof object.clientAccountType === "number") { - message.clientAccountType = object.clientAccountType; - break; - } - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": - case 0: - message.clientAccountType = 0; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": - case 1: - message.clientAccountType = 1; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": - case 2: - message.clientAccountType = 2; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": - case 3: - message.clientAccountType = 3; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": - case 4: - message.clientAccountType = 4; - break; - } - if (object.clientAccountId != null) - if ($util.Long) - (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; - else if (typeof object.clientAccountId === "string") - message.clientAccountId = parseInt(object.clientAccountId, 10); - else if (typeof object.clientAccountId === "number") - message.clientAccountId = object.clientAccountId; - else if (typeof object.clientAccountId === "object") - message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); - if (object.clientAccountDisplayName != null) - message.clientAccountDisplayName = String(object.clientAccountDisplayName); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "USER_LIST_LICENSE_STATUS_ENABLED": - case 1: - message.status = 1; - break; - case "USER_LIST_LICENSE_STATUS_DISABLED": - case 2: - message.status = 2; - break; - } - if (object.pricing != null) { - if (typeof object.pricing !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.pricing: object expected"); - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); - } - if (object.historicalPricings) { - if (!Array.isArray(object.historicalPricings)) - throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: array expected"); - message.historicalPricings = []; - for (var i = 0; i < object.historicalPricings.length; ++i) { - if (typeof object.historicalPricings[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: object expected"); - message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); - } - } - if (object.metrics != null) { - if (typeof object.metrics !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.metrics: object expected"); - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); - } - return message; - }; - - /** - * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {google.ads.datamanager.v1.UserListDirectLicense} message UserListDirectLicense - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserListDirectLicense.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.historicalPricings = []; - if (options.defaults) { - object.name = ""; - object.userListDisplayName = ""; - object.clientAccountDisplayName = ""; - object.pricing = null; - object.metrics = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userListId != null && message.hasOwnProperty("userListId")) { - if (typeof message.userListId === "number") - object.userListId = options.longs === String ? String(message.userListId) : message.userListId; - else - object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; - if (options.oneofs) - object._userListId = "userListId"; - } - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - object.userListDisplayName = message.userListDisplayName; - if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { - object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; - if (options.oneofs) - object._clientAccountType = "clientAccountType"; - } - if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { - if (typeof message.clientAccountId === "number") - object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; - else - object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; - if (options.oneofs) - object._clientAccountId = "clientAccountId"; - } - if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) - object.clientAccountDisplayName = message.clientAccountDisplayName; - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.pricing != null && message.hasOwnProperty("pricing")) - object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); - if (message.historicalPricings && message.historicalPricings.length) { - object.historicalPricings = []; - for (var j = 0; j < message.historicalPricings.length; ++j) - object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); - } - if (message.metrics != null && message.hasOwnProperty("metrics")) - object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); - return object; - }; - - /** - * Converts this UserListDirectLicense to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @instance - * @returns {Object.} JSON object - */ - UserListDirectLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserListDirectLicense - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserListDirectLicense - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserListDirectLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserListDirectLicense"; - }; - - return UserListDirectLicense; - })(); - - /** - * UserListLicenseClientAccountType enum. - * @name google.ads.datamanager.v1.UserListLicenseClientAccountType - * @enum {number} - * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN=0 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN value - * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS=1 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS value - * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER=2 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER value - * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER=3 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER value - * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK=4 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK value - */ - v1.UserListLicenseClientAccountType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS"] = 1; - values[valuesById[2] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER"] = 2; - values[valuesById[3] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER"] = 3; - values[valuesById[4] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 4; - return values; - })(); - - v1.UserListLicenseMetrics = (function() { - - /** - * Properties of a UserListLicenseMetrics. - * @memberof google.ads.datamanager.v1 - * @interface IUserListLicenseMetrics - * @property {number|Long|null} [clickCount] UserListLicenseMetrics clickCount - * @property {number|Long|null} [impressionCount] UserListLicenseMetrics impressionCount - * @property {number|Long|null} [revenueUsdMicros] UserListLicenseMetrics revenueUsdMicros - * @property {number|Long|null} [startDate] UserListLicenseMetrics startDate - * @property {number|Long|null} [endDate] UserListLicenseMetrics endDate - */ - - /** - * Constructs a new UserListLicenseMetrics. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListLicenseMetrics. - * @implements IUserListLicenseMetrics - * @constructor - * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set - */ - function UserListLicenseMetrics(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserListLicenseMetrics clickCount. - * @member {number|Long} clickCount - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - */ - UserListLicenseMetrics.prototype.clickCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListLicenseMetrics impressionCount. - * @member {number|Long} impressionCount - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - */ - UserListLicenseMetrics.prototype.impressionCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListLicenseMetrics revenueUsdMicros. - * @member {number|Long} revenueUsdMicros - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - */ - UserListLicenseMetrics.prototype.revenueUsdMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListLicenseMetrics startDate. - * @member {number|Long} startDate - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - */ - UserListLicenseMetrics.prototype.startDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListLicenseMetrics endDate. - * @member {number|Long} endDate - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - */ - UserListLicenseMetrics.prototype.endDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new UserListLicenseMetrics instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics instance - */ - UserListLicenseMetrics.create = function create(properties) { - return new UserListLicenseMetrics(properties); - }; - - /** - * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListLicenseMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clickCount != null && Object.hasOwnProperty.call(message, "clickCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.clickCount); - if (message.impressionCount != null && Object.hasOwnProperty.call(message, "impressionCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.impressionCount); - if (message.revenueUsdMicros != null && Object.hasOwnProperty.call(message, "revenueUsdMicros")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.revenueUsdMicros); - if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startDate); - if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endDate); - return writer; - }; - - /** - * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListLicenseMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserListLicenseMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @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.UserListLicenseMetrics} UserListLicenseMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListLicenseMetrics.decode = function decode(reader, 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.UserListLicenseMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.clickCount = reader.int64(); - break; - } - case 2: { - message.impressionCount = reader.int64(); - break; - } - case 3: { - message.revenueUsdMicros = reader.int64(); - break; - } - case 4: { - message.startDate = reader.int64(); - break; - } - case 5: { - message.endDate = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListLicenseMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserListLicenseMetrics message. - * @function verify - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserListLicenseMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clickCount != null && message.hasOwnProperty("clickCount")) - if (!$util.isInteger(message.clickCount) && !(message.clickCount && $util.isInteger(message.clickCount.low) && $util.isInteger(message.clickCount.high))) - return "clickCount: integer|Long expected"; - if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) - if (!$util.isInteger(message.impressionCount) && !(message.impressionCount && $util.isInteger(message.impressionCount.low) && $util.isInteger(message.impressionCount.high))) - return "impressionCount: integer|Long expected"; - if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) - if (!$util.isInteger(message.revenueUsdMicros) && !(message.revenueUsdMicros && $util.isInteger(message.revenueUsdMicros.low) && $util.isInteger(message.revenueUsdMicros.high))) - return "revenueUsdMicros: integer|Long expected"; - if (message.startDate != null && message.hasOwnProperty("startDate")) - if (!$util.isInteger(message.startDate) && !(message.startDate && $util.isInteger(message.startDate.low) && $util.isInteger(message.startDate.high))) - return "startDate: integer|Long expected"; - if (message.endDate != null && message.hasOwnProperty("endDate")) - if (!$util.isInteger(message.endDate) && !(message.endDate && $util.isInteger(message.endDate.low) && $util.isInteger(message.endDate.high))) - return "endDate: integer|Long expected"; - return null; - }; - - /** - * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics - */ - UserListLicenseMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserListLicenseMetrics) - return object; - var message = new $root.google.ads.datamanager.v1.UserListLicenseMetrics(); - if (object.clickCount != null) - if ($util.Long) - (message.clickCount = $util.Long.fromValue(object.clickCount)).unsigned = false; - else if (typeof object.clickCount === "string") - message.clickCount = parseInt(object.clickCount, 10); - else if (typeof object.clickCount === "number") - message.clickCount = object.clickCount; - else if (typeof object.clickCount === "object") - message.clickCount = new $util.LongBits(object.clickCount.low >>> 0, object.clickCount.high >>> 0).toNumber(); - if (object.impressionCount != null) - if ($util.Long) - (message.impressionCount = $util.Long.fromValue(object.impressionCount)).unsigned = false; - else if (typeof object.impressionCount === "string") - message.impressionCount = parseInt(object.impressionCount, 10); - else if (typeof object.impressionCount === "number") - message.impressionCount = object.impressionCount; - else if (typeof object.impressionCount === "object") - message.impressionCount = new $util.LongBits(object.impressionCount.low >>> 0, object.impressionCount.high >>> 0).toNumber(); - if (object.revenueUsdMicros != null) - if ($util.Long) - (message.revenueUsdMicros = $util.Long.fromValue(object.revenueUsdMicros)).unsigned = false; - else if (typeof object.revenueUsdMicros === "string") - message.revenueUsdMicros = parseInt(object.revenueUsdMicros, 10); - else if (typeof object.revenueUsdMicros === "number") - message.revenueUsdMicros = object.revenueUsdMicros; - else if (typeof object.revenueUsdMicros === "object") - message.revenueUsdMicros = new $util.LongBits(object.revenueUsdMicros.low >>> 0, object.revenueUsdMicros.high >>> 0).toNumber(); - if (object.startDate != null) - if ($util.Long) - (message.startDate = $util.Long.fromValue(object.startDate)).unsigned = false; - else if (typeof object.startDate === "string") - message.startDate = parseInt(object.startDate, 10); - else if (typeof object.startDate === "number") - message.startDate = object.startDate; - else if (typeof object.startDate === "object") - message.startDate = new $util.LongBits(object.startDate.low >>> 0, object.startDate.high >>> 0).toNumber(); - if (object.endDate != null) - if ($util.Long) - (message.endDate = $util.Long.fromValue(object.endDate)).unsigned = false; - else if (typeof object.endDate === "string") - message.endDate = parseInt(object.endDate, 10); - else if (typeof object.endDate === "number") - message.endDate = object.endDate; - else if (typeof object.endDate === "object") - message.endDate = new $util.LongBits(object.endDate.low >>> 0, object.endDate.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {google.ads.datamanager.v1.UserListLicenseMetrics} message UserListLicenseMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserListLicenseMetrics.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.clickCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.clickCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.impressionCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.impressionCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.revenueUsdMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revenueUsdMicros = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startDate = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.endDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.endDate = options.longs === String ? "0" : 0; - } - if (message.clickCount != null && message.hasOwnProperty("clickCount")) - if (typeof message.clickCount === "number") - object.clickCount = options.longs === String ? String(message.clickCount) : message.clickCount; - else - object.clickCount = options.longs === String ? $util.Long.prototype.toString.call(message.clickCount) : options.longs === Number ? new $util.LongBits(message.clickCount.low >>> 0, message.clickCount.high >>> 0).toNumber() : message.clickCount; - if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) - if (typeof message.impressionCount === "number") - object.impressionCount = options.longs === String ? String(message.impressionCount) : message.impressionCount; - else - object.impressionCount = options.longs === String ? $util.Long.prototype.toString.call(message.impressionCount) : options.longs === Number ? new $util.LongBits(message.impressionCount.low >>> 0, message.impressionCount.high >>> 0).toNumber() : message.impressionCount; - if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) - if (typeof message.revenueUsdMicros === "number") - object.revenueUsdMicros = options.longs === String ? String(message.revenueUsdMicros) : message.revenueUsdMicros; - else - object.revenueUsdMicros = options.longs === String ? $util.Long.prototype.toString.call(message.revenueUsdMicros) : options.longs === Number ? new $util.LongBits(message.revenueUsdMicros.low >>> 0, message.revenueUsdMicros.high >>> 0).toNumber() : message.revenueUsdMicros; - if (message.startDate != null && message.hasOwnProperty("startDate")) - if (typeof message.startDate === "number") - object.startDate = options.longs === String ? String(message.startDate) : message.startDate; - else - object.startDate = options.longs === String ? $util.Long.prototype.toString.call(message.startDate) : options.longs === Number ? new $util.LongBits(message.startDate.low >>> 0, message.startDate.high >>> 0).toNumber() : message.startDate; - if (message.endDate != null && message.hasOwnProperty("endDate")) - if (typeof message.endDate === "number") - object.endDate = options.longs === String ? String(message.endDate) : message.endDate; - else - object.endDate = options.longs === String ? $util.Long.prototype.toString.call(message.endDate) : options.longs === Number ? new $util.LongBits(message.endDate.low >>> 0, message.endDate.high >>> 0).toNumber() : message.endDate; - return object; - }; - - /** - * Converts this UserListLicenseMetrics to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @instance - * @returns {Object.} JSON object - */ - UserListLicenseMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserListLicenseMetrics - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserListLicenseMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserListLicenseMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicenseMetrics"; - }; - - return UserListLicenseMetrics; - })(); - - v1.UserListLicensePricing = (function() { - - /** - * Properties of a UserListLicensePricing. - * @memberof google.ads.datamanager.v1 - * @interface IUserListLicensePricing - * @property {number|Long|null} [pricingId] UserListLicensePricing pricingId - * @property {number|Long|null} [costMicros] UserListLicensePricing costMicros - * @property {string|null} [currencyCode] UserListLicensePricing currencyCode - * @property {google.protobuf.ITimestamp|null} [startTime] UserListLicensePricing startTime - * @property {google.protobuf.ITimestamp|null} [endTime] UserListLicensePricing endTime - * @property {boolean|null} [pricingActive] UserListLicensePricing pricingActive - * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null} [buyerApprovalState] UserListLicensePricing buyerApprovalState - * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null} [costType] UserListLicensePricing costType - * @property {number|Long|null} [maxCostMicros] UserListLicensePricing maxCostMicros - */ - - /** - * Constructs a new UserListLicensePricing. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListLicensePricing. - * @implements IUserListLicensePricing - * @constructor - * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set - */ - function UserListLicensePricing(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserListLicensePricing pricingId. - * @member {number|Long} pricingId - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.pricingId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListLicensePricing costMicros. - * @member {number|Long|null|undefined} costMicros - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.costMicros = null; - - /** - * UserListLicensePricing currencyCode. - * @member {string|null|undefined} currencyCode - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.currencyCode = null; - - /** - * UserListLicensePricing startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.startTime = null; - - /** - * UserListLicensePricing endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.endTime = null; - - /** - * UserListLicensePricing pricingActive. - * @member {boolean} pricingActive - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.pricingActive = false; - - /** - * UserListLicensePricing buyerApprovalState. - * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState} buyerApprovalState - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.buyerApprovalState = 0; - - /** - * UserListLicensePricing costType. - * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null|undefined} costType - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.costType = null; - - /** - * UserListLicensePricing maxCostMicros. - * @member {number|Long|null|undefined} maxCostMicros - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - */ - UserListLicensePricing.prototype.maxCostMicros = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListLicensePricing.prototype, "_costMicros", { - get: $util.oneOfGetter($oneOfFields = ["costMicros"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListLicensePricing.prototype, "_currencyCode", { - get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListLicensePricing.prototype, "_costType", { - get: $util.oneOfGetter($oneOfFields = ["costType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListLicensePricing.prototype, "_maxCostMicros", { - get: $util.oneOfGetter($oneOfFields = ["maxCostMicros"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UserListLicensePricing instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing instance - */ - UserListLicensePricing.create = function create(properties) { - return new UserListLicensePricing(properties); - }; - - /** - * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListLicensePricing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pricingId != null && Object.hasOwnProperty.call(message, "pricingId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pricingId); - if (message.costMicros != null && Object.hasOwnProperty.call(message, "costMicros")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.costMicros); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pricingActive != null && Object.hasOwnProperty.call(message, "pricingActive")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.pricingActive); - if (message.buyerApprovalState != null && Object.hasOwnProperty.call(message, "buyerApprovalState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.buyerApprovalState); - if (message.costType != null && Object.hasOwnProperty.call(message, "costType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.costType); - if (message.maxCostMicros != null && Object.hasOwnProperty.call(message, "maxCostMicros")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxCostMicros); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.currencyCode); - return writer; - }; - - /** - * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListLicensePricing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserListLicensePricing message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @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.UserListLicensePricing} UserListLicensePricing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListLicensePricing.decode = function decode(reader, 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.UserListLicensePricing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.pricingId = reader.int64(); - break; - } - case 2: { - message.costMicros = reader.int64(); - break; - } - case 9: { - message.currencyCode = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.pricingActive = reader.bool(); - break; - } - case 6: { - message.buyerApprovalState = reader.int32(); - break; - } - case 7: { - message.costType = reader.int32(); - break; - } - case 8: { - message.maxCostMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListLicensePricing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserListLicensePricing message. - * @function verify - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserListLicensePricing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.pricingId != null && message.hasOwnProperty("pricingId")) - if (!$util.isInteger(message.pricingId) && !(message.pricingId && $util.isInteger(message.pricingId.low) && $util.isInteger(message.pricingId.high))) - return "pricingId: integer|Long expected"; - if (message.costMicros != null && message.hasOwnProperty("costMicros")) { - properties._costMicros = 1; - if (!$util.isInteger(message.costMicros) && !(message.costMicros && $util.isInteger(message.costMicros.low) && $util.isInteger(message.costMicros.high))) - return "costMicros: integer|Long 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")) { - 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; - } - if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) - if (typeof message.pricingActive !== "boolean") - return "pricingActive: boolean expected"; - if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) - switch (message.buyerApprovalState) { - default: - return "buyerApprovalState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.costType != null && message.hasOwnProperty("costType")) { - properties._costType = 1; - switch (message.costType) { - default: - return "costType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { - properties._maxCostMicros = 1; - if (!$util.isInteger(message.maxCostMicros) && !(message.maxCostMicros && $util.isInteger(message.maxCostMicros.low) && $util.isInteger(message.maxCostMicros.high))) - return "maxCostMicros: integer|Long expected"; - } - return null; - }; - - /** - * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing - */ - UserListLicensePricing.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserListLicensePricing) - return object; - var message = new $root.google.ads.datamanager.v1.UserListLicensePricing(); - if (object.pricingId != null) - if ($util.Long) - (message.pricingId = $util.Long.fromValue(object.pricingId)).unsigned = false; - else if (typeof object.pricingId === "string") - message.pricingId = parseInt(object.pricingId, 10); - else if (typeof object.pricingId === "number") - message.pricingId = object.pricingId; - else if (typeof object.pricingId === "object") - message.pricingId = new $util.LongBits(object.pricingId.low >>> 0, object.pricingId.high >>> 0).toNumber(); - if (object.costMicros != null) - if ($util.Long) - (message.costMicros = $util.Long.fromValue(object.costMicros)).unsigned = false; - else if (typeof object.costMicros === "string") - message.costMicros = parseInt(object.costMicros, 10); - else if (typeof object.costMicros === "number") - message.costMicros = object.costMicros; - else if (typeof object.costMicros === "object") - message.costMicros = new $util.LongBits(object.costMicros.low >>> 0, object.costMicros.high >>> 0).toNumber(); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListLicensePricing.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.datamanager.v1.UserListLicensePricing.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.pricingActive != null) - message.pricingActive = Boolean(object.pricingActive); - switch (object.buyerApprovalState) { - default: - if (typeof object.buyerApprovalState === "number") { - message.buyerApprovalState = object.buyerApprovalState; - break; - } - break; - case "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": - case 0: - message.buyerApprovalState = 0; - break; - case "PENDING": - case 1: - message.buyerApprovalState = 1; - break; - case "APPROVED": - case 2: - message.buyerApprovalState = 2; - break; - case "REJECTED": - case 3: - message.buyerApprovalState = 3; - break; - } - switch (object.costType) { - default: - if (typeof object.costType === "number") { - message.costType = object.costType; - break; - } - break; - case "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": - case 0: - message.costType = 0; - break; - case "CPC": - case 1: - message.costType = 1; - break; - case "CPM": - case 2: - message.costType = 2; - break; - case "MEDIA_SHARE": - case 3: - message.costType = 3; - break; - } - if (object.maxCostMicros != null) - if ($util.Long) - (message.maxCostMicros = $util.Long.fromValue(object.maxCostMicros)).unsigned = false; - else if (typeof object.maxCostMicros === "string") - message.maxCostMicros = parseInt(object.maxCostMicros, 10); - else if (typeof object.maxCostMicros === "number") - message.maxCostMicros = object.maxCostMicros; - else if (typeof object.maxCostMicros === "object") - message.maxCostMicros = new $util.LongBits(object.maxCostMicros.low >>> 0, object.maxCostMicros.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {google.ads.datamanager.v1.UserListLicensePricing} message UserListLicensePricing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserListLicensePricing.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.pricingId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pricingId = options.longs === String ? "0" : 0; - object.startTime = null; - object.endTime = null; - object.pricingActive = false; - object.buyerApprovalState = options.enums === String ? "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED" : 0; - } - if (message.pricingId != null && message.hasOwnProperty("pricingId")) - if (typeof message.pricingId === "number") - object.pricingId = options.longs === String ? String(message.pricingId) : message.pricingId; - else - object.pricingId = options.longs === String ? $util.Long.prototype.toString.call(message.pricingId) : options.longs === Number ? new $util.LongBits(message.pricingId.low >>> 0, message.pricingId.high >>> 0).toNumber() : message.pricingId; - if (message.costMicros != null && message.hasOwnProperty("costMicros")) { - if (typeof message.costMicros === "number") - object.costMicros = options.longs === String ? String(message.costMicros) : message.costMicros; - else - object.costMicros = options.longs === String ? $util.Long.prototype.toString.call(message.costMicros) : options.longs === Number ? new $util.LongBits(message.costMicros.low >>> 0, message.costMicros.high >>> 0).toNumber() : message.costMicros; - if (options.oneofs) - object._costMicros = "costMicros"; - } - 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); - if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) - object.pricingActive = message.pricingActive; - if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) - object.buyerApprovalState = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] === undefined ? message.buyerApprovalState : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] : message.buyerApprovalState; - if (message.costType != null && message.hasOwnProperty("costType")) { - object.costType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] === undefined ? message.costType : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] : message.costType; - if (options.oneofs) - object._costType = "costType"; - } - if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { - if (typeof message.maxCostMicros === "number") - object.maxCostMicros = options.longs === String ? String(message.maxCostMicros) : message.maxCostMicros; - else - object.maxCostMicros = options.longs === String ? $util.Long.prototype.toString.call(message.maxCostMicros) : options.longs === Number ? new $util.LongBits(message.maxCostMicros.low >>> 0, message.maxCostMicros.high >>> 0).toNumber() : message.maxCostMicros; - if (options.oneofs) - object._maxCostMicros = "maxCostMicros"; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { - object.currencyCode = message.currencyCode; - if (options.oneofs) - object._currencyCode = "currencyCode"; - } - return object; - }; - - /** - * Converts this UserListLicensePricing to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @instance - * @returns {Object.} JSON object - */ - UserListLicensePricing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserListLicensePricing - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserListLicensePricing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserListLicensePricing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicensePricing"; - }; - - /** - * UserListPricingBuyerApprovalState enum. - * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState - * @enum {number} - * @property {number} USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED=0 USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} APPROVED=2 APPROVED value - * @property {number} REJECTED=3 REJECTED value - */ - UserListLicensePricing.UserListPricingBuyerApprovalState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "APPROVED"] = 2; - values[valuesById[3] = "REJECTED"] = 3; - return values; - })(); - - /** - * UserListPricingCostType enum. - * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType - * @enum {number} - * @property {number} USER_LIST_PRICING_COST_TYPE_UNSPECIFIED=0 USER_LIST_PRICING_COST_TYPE_UNSPECIFIED value - * @property {number} CPC=1 CPC value - * @property {number} CPM=2 CPM value - * @property {number} MEDIA_SHARE=3 MEDIA_SHARE value - */ - UserListLicensePricing.UserListPricingCostType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CPC"] = 1; - values[valuesById[2] = "CPM"] = 2; - values[valuesById[3] = "MEDIA_SHARE"] = 3; - return values; - })(); - - return UserListLicensePricing; - })(); - - /** - * UserListLicenseStatus enum. - * @name google.ads.datamanager.v1.UserListLicenseStatus - * @enum {number} - * @property {number} USER_LIST_LICENSE_STATUS_UNSPECIFIED=0 USER_LIST_LICENSE_STATUS_UNSPECIFIED value - * @property {number} USER_LIST_LICENSE_STATUS_ENABLED=1 USER_LIST_LICENSE_STATUS_ENABLED value - * @property {number} USER_LIST_LICENSE_STATUS_DISABLED=2 USER_LIST_LICENSE_STATUS_DISABLED value - */ - v1.UserListLicenseStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_LIST_LICENSE_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_LIST_LICENSE_STATUS_ENABLED"] = 1; - values[valuesById[2] = "USER_LIST_LICENSE_STATUS_DISABLED"] = 2; - return values; - })(); - - v1.UserListDirectLicenseService = (function() { - - /** - * Constructs a new UserListDirectLicenseService service. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListDirectLicenseService - * @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 UserListDirectLicenseService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (UserListDirectLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListDirectLicenseService; - - /** - * Creates new UserListDirectLicenseService service using the specified rpc implementation. - * @function create - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @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 {UserListDirectLicenseService} RPC service. Useful where requests and/or responses are streamed. - */ - UserListDirectLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @typedef CreateUserListDirectLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense - */ - - /** - * Calls CreateUserListDirectLicense. - * @function createUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListDirectLicenseService.prototype.createUserListDirectLicense = function createUserListDirectLicense(request, callback) { - return this.rpcCall(createUserListDirectLicense, $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); - }, "name", { value: "CreateUserListDirectLicense" }); - - /** - * Calls CreateUserListDirectLicense. - * @function createUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @typedef GetUserListDirectLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense - */ - - /** - * Calls GetUserListDirectLicense. - * @function getUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListDirectLicenseService.prototype.getUserListDirectLicense = function getUserListDirectLicense(request, callback) { - return this.rpcCall(getUserListDirectLicense, $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); - }, "name", { value: "GetUserListDirectLicense" }); - - /** - * Calls GetUserListDirectLicense. - * @function getUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @typedef UpdateUserListDirectLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense - */ - - /** - * Calls UpdateUserListDirectLicense. - * @function updateUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListDirectLicenseService.prototype.updateUserListDirectLicense = function updateUserListDirectLicense(request, callback) { - return this.rpcCall(updateUserListDirectLicense, $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); - }, "name", { value: "UpdateUserListDirectLicense" }); - - /** - * Calls UpdateUserListDirectLicense. - * @function updateUserListDirectLicense - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @typedef ListUserListDirectLicensesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} [response] ListUserListDirectLicensesResponse - */ - - /** - * Calls ListUserListDirectLicenses. - * @function listUserListDirectLicenses - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object - * @param {google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListDirectLicenseService.prototype.listUserListDirectLicenses = function listUserListDirectLicenses(request, callback) { - return this.rpcCall(listUserListDirectLicenses, $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest, $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse, request, callback); - }, "name", { value: "ListUserListDirectLicenses" }); - - /** - * Calls ListUserListDirectLicenses. - * @function listUserListDirectLicenses - * @memberof google.ads.datamanager.v1.UserListDirectLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return UserListDirectLicenseService; - })(); - - v1.CreateUserListDirectLicenseRequest = (function() { - - /** - * Properties of a CreateUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface ICreateUserListDirectLicenseRequest - * @property {string|null} [parent] CreateUserListDirectLicenseRequest parent - * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] CreateUserListDirectLicenseRequest userListDirectLicense - */ - - /** - * Constructs a new CreateUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a CreateUserListDirectLicenseRequest. - * @implements ICreateUserListDirectLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set - */ - function CreateUserListDirectLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserListDirectLicenseRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @instance - */ - CreateUserListDirectLicenseRequest.prototype.parent = ""; - - /** - * CreateUserListDirectLicenseRequest userListDirectLicense. - * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @instance - */ - CreateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; - - /** - * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest instance - */ - CreateUserListDirectLicenseRequest.create = function create(properties) { - return new CreateUserListDirectLicenseRequest(properties); - }; - - /** - * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) - $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @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.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListDirectLicenseRequest.decode = function decode(reader, 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.CreateUserListDirectLicenseRequest(); - 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.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserListDirectLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { - var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); - if (error) - return "userListDirectLicense." + error; - } - return null; - }; - - /** - * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest - */ - CreateUserListDirectLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userListDirectLicense != null) { - if (typeof object.userListDirectLicense !== "object") - throw TypeError(".google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.userListDirectLicense: object expected"); - message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserListDirectLicenseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userListDirectLicense = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) - object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); - return object; - }; - - /** - * Converts this CreateUserListDirectLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserListDirectLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListDirectLicenseRequest"; - }; - - return CreateUserListDirectLicenseRequest; - })(); - - v1.GetUserListDirectLicenseRequest = (function() { - - /** - * Properties of a GetUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface IGetUserListDirectLicenseRequest - * @property {string|null} [name] GetUserListDirectLicenseRequest name - */ - - /** - * Constructs a new GetUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a GetUserListDirectLicenseRequest. - * @implements IGetUserListDirectLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set - */ - function GetUserListDirectLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserListDirectLicenseRequest name. - * @member {string} name - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @instance - */ - GetUserListDirectLicenseRequest.prototype.name = ""; - - /** - * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest instance - */ - GetUserListDirectLicenseRequest.create = function create(properties) { - return new GetUserListDirectLicenseRequest(properties); - }; - - /** - * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @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.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListDirectLicenseRequest.decode = function decode(reader, 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.GetUserListDirectLicenseRequest(); - 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 GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserListDirectLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest - */ - GetUserListDirectLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserListDirectLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListDirectLicenseRequest"; - }; - - return GetUserListDirectLicenseRequest; - })(); - - v1.UpdateUserListDirectLicenseRequest = (function() { - - /** - * Properties of an UpdateUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface IUpdateUserListDirectLicenseRequest - * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] UpdateUserListDirectLicenseRequest userListDirectLicense - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListDirectLicenseRequest updateMask - */ - - /** - * Constructs a new UpdateUserListDirectLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an UpdateUserListDirectLicenseRequest. - * @implements IUpdateUserListDirectLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set - */ - function UpdateUserListDirectLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserListDirectLicenseRequest userListDirectLicense. - * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @instance - */ - UpdateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; - - /** - * UpdateUserListDirectLicenseRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @instance - */ - UpdateUserListDirectLicenseRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest instance - */ - UpdateUserListDirectLicenseRequest.create = function create(properties) { - return new UpdateUserListDirectLicenseRequest(properties); - }; - - /** - * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListDirectLicenseRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) - $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, 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 UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @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.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListDirectLicenseRequest.decode = function decode(reader, 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.UpdateUserListDirectLicenseRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.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 UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserListDirectLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserListDirectLicenseRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { - var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); - if (error) - return "userListDirectLicense." + 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest - */ - UpdateUserListDirectLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest(); - if (object.userListDirectLicense != null) { - if (typeof object.userListDirectLicense !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.userListDirectLicense: object expected"); - message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserListDirectLicenseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userListDirectLicense = null; - object.updateMask = null; - } - if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) - object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateUserListDirectLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserListDirectLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest"; - }; - - return UpdateUserListDirectLicenseRequest; - })(); - - v1.ListUserListDirectLicensesRequest = (function() { - - /** - * Properties of a ListUserListDirectLicensesRequest. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListDirectLicensesRequest - * @property {string|null} [parent] ListUserListDirectLicensesRequest parent - * @property {string|null} [filter] ListUserListDirectLicensesRequest filter - * @property {number|null} [pageSize] ListUserListDirectLicensesRequest pageSize - * @property {string|null} [pageToken] ListUserListDirectLicensesRequest pageToken - */ - - /** - * Constructs a new ListUserListDirectLicensesRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListDirectLicensesRequest. - * @implements IListUserListDirectLicensesRequest - * @constructor - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set - */ - function ListUserListDirectLicensesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListDirectLicensesRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @instance - */ - ListUserListDirectLicensesRequest.prototype.parent = ""; - - /** - * ListUserListDirectLicensesRequest filter. - * @member {string} filter - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @instance - */ - ListUserListDirectLicensesRequest.prototype.filter = ""; - - /** - * ListUserListDirectLicensesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @instance - */ - ListUserListDirectLicensesRequest.prototype.pageSize = 0; - - /** - * ListUserListDirectLicensesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @instance - */ - ListUserListDirectLicensesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest instance - */ - ListUserListDirectLicensesRequest.create = function create(properties) { - return new ListUserListDirectLicensesRequest(properties); - }; - - /** - * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListDirectLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - 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); - return writer; - }; - - /** - * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListDirectLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @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.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListDirectLicensesRequest.decode = function decode(reader, 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.ListUserListDirectLicensesRequest(); - 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.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListDirectLicensesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListDirectLicensesRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListDirectLicensesRequest.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.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 ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest - */ - ListUserListDirectLicensesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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 ListUserListDirectLicensesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListDirectLicensesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - return object; - }; - - /** - * Converts this ListUserListDirectLicensesRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserListDirectLicensesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListDirectLicensesRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListDirectLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesRequest"; - }; - - return ListUserListDirectLicensesRequest; - })(); - - v1.ListUserListDirectLicensesResponse = (function() { - - /** - * Properties of a ListUserListDirectLicensesResponse. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListDirectLicensesResponse - * @property {Array.|null} [userListDirectLicenses] ListUserListDirectLicensesResponse userListDirectLicenses - * @property {string|null} [nextPageToken] ListUserListDirectLicensesResponse nextPageToken - */ - - /** - * Constructs a new ListUserListDirectLicensesResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListDirectLicensesResponse. - * @implements IListUserListDirectLicensesResponse - * @constructor - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set - */ - function ListUserListDirectLicensesResponse(properties) { - this.userListDirectLicenses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListDirectLicensesResponse userListDirectLicenses. - * @member {Array.} userListDirectLicenses - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @instance - */ - ListUserListDirectLicensesResponse.prototype.userListDirectLicenses = $util.emptyArray; - - /** - * ListUserListDirectLicensesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @instance - */ - ListUserListDirectLicensesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse instance - */ - ListUserListDirectLicensesResponse.create = function create(properties) { - return new ListUserListDirectLicensesResponse(properties); - }; - - /** - * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListDirectLicensesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userListDirectLicenses != null && message.userListDirectLicenses.length) - for (var i = 0; i < message.userListDirectLicenses.length; ++i) - $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicenses[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 ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListDirectLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @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.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListDirectLicensesResponse.decode = function decode(reader, 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.ListUserListDirectLicensesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.userListDirectLicenses && message.userListDirectLicenses.length)) - message.userListDirectLicenses = []; - message.userListDirectLicenses.push($root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListDirectLicensesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListDirectLicensesResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListDirectLicensesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userListDirectLicenses != null && message.hasOwnProperty("userListDirectLicenses")) { - if (!Array.isArray(message.userListDirectLicenses)) - return "userListDirectLicenses: array expected"; - for (var i = 0; i < message.userListDirectLicenses.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicenses[i]); - if (error) - return "userListDirectLicenses." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse - */ - ListUserListDirectLicensesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse(); - if (object.userListDirectLicenses) { - if (!Array.isArray(object.userListDirectLicenses)) - throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: array expected"); - message.userListDirectLicenses = []; - for (var i = 0; i < object.userListDirectLicenses.length; ++i) { - if (typeof object.userListDirectLicenses[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: object expected"); - message.userListDirectLicenses[i] = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicenses[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListDirectLicensesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userListDirectLicenses = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userListDirectLicenses && message.userListDirectLicenses.length) { - object.userListDirectLicenses = []; - for (var j = 0; j < message.userListDirectLicenses.length; ++j) - object.userListDirectLicenses[j] = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicenses[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserListDirectLicensesResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserListDirectLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListDirectLicensesResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListDirectLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesResponse"; - }; - - return ListUserListDirectLicensesResponse; - })(); - - v1.UserListGlobalLicense = (function() { - - /** - * Properties of a UserListGlobalLicense. - * @memberof google.ads.datamanager.v1 - * @interface IUserListGlobalLicense - * @property {string|null} [name] UserListGlobalLicense name - * @property {number|Long|null} [userListId] UserListGlobalLicense userListId - * @property {string|null} [userListDisplayName] UserListGlobalLicense userListDisplayName - * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicense licenseType - * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicense status - * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicense pricing - * @property {Array.|null} [historicalPricings] UserListGlobalLicense historicalPricings - * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicense metrics - */ - - /** - * Constructs a new UserListGlobalLicense. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListGlobalLicense. - * @implements IUserListGlobalLicense - * @constructor - * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set - */ - function UserListGlobalLicense(properties) { - this.historicalPricings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserListGlobalLicense name. - * @member {string} name - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.name = ""; - - /** - * UserListGlobalLicense userListId. - * @member {number|Long|null|undefined} userListId - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.userListId = null; - - /** - * UserListGlobalLicense userListDisplayName. - * @member {string} userListDisplayName - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.userListDisplayName = ""; - - /** - * UserListGlobalLicense licenseType. - * @member {google.ads.datamanager.v1.UserListGlobalLicenseType|null|undefined} licenseType - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.licenseType = null; - - /** - * UserListGlobalLicense status. - * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.status = null; - - /** - * UserListGlobalLicense pricing. - * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.pricing = null; - - /** - * UserListGlobalLicense historicalPricings. - * @member {Array.} historicalPricings - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.historicalPricings = $util.emptyArray; - - /** - * UserListGlobalLicense metrics. - * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - */ - UserListGlobalLicense.prototype.metrics = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListGlobalLicense.prototype, "_userListId", { - get: $util.oneOfGetter($oneOfFields = ["userListId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListGlobalLicense.prototype, "_licenseType", { - get: $util.oneOfGetter($oneOfFields = ["licenseType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(UserListGlobalLicense.prototype, "_status", { - get: $util.oneOfGetter($oneOfFields = ["status"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UserListGlobalLicense instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense instance - */ - UserListGlobalLicense.create = function create(properties) { - return new UserListGlobalLicense(properties); - }; - - /** - * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListGlobalLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); - if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); - if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); - if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.historicalPricings != null && message.historicalPricings.length) - for (var i = 0; i < message.historicalPricings.length; ++i) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListGlobalLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserListGlobalLicense message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @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.UserListGlobalLicense} UserListGlobalLicense - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListGlobalLicense.decode = function decode(reader, 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.UserListGlobalLicense(); - 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.userListId = reader.int64(); - break; - } - case 3: { - message.userListDisplayName = reader.string(); - break; - } - case 4: { - message.licenseType = reader.int32(); - break; - } - case 5: { - message.status = reader.int32(); - break; - } - case 6: { - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.historicalPricings && message.historicalPricings.length)) - message.historicalPricings = []; - message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); - break; - } - case 8: { - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListGlobalLicense.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserListGlobalLicense message. - * @function verify - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserListGlobalLicense.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.userListId != null && message.hasOwnProperty("userListId")) { - properties._userListId = 1; - if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) - return "userListId: integer|Long expected"; - } - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - if (!$util.isString(message.userListDisplayName)) - return "userListDisplayName: string expected"; - if (message.licenseType != null && message.hasOwnProperty("licenseType")) { - properties._licenseType = 1; - switch (message.licenseType) { - default: - return "licenseType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - 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.pricing != null && message.hasOwnProperty("pricing")) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); - if (error) - return "pricing." + error; - } - if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { - if (!Array.isArray(message.historicalPricings)) - return "historicalPricings: array expected"; - for (var i = 0; i < message.historicalPricings.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); - if (error) - return "historicalPricings." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); - if (error) - return "metrics." + error; - } - return null; - }; - - /** - * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense - */ - UserListGlobalLicense.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicense) - return object; - var message = new $root.google.ads.datamanager.v1.UserListGlobalLicense(); - if (object.name != null) - message.name = String(object.name); - if (object.userListId != null) - if ($util.Long) - (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; - else if (typeof object.userListId === "string") - message.userListId = parseInt(object.userListId, 10); - else if (typeof object.userListId === "number") - message.userListId = object.userListId; - else if (typeof object.userListId === "object") - message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); - if (object.userListDisplayName != null) - message.userListDisplayName = String(object.userListDisplayName); - switch (object.licenseType) { - default: - if (typeof object.licenseType === "number") { - message.licenseType = object.licenseType; - break; - } - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": - case 0: - message.licenseType = 0; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": - case 1: - message.licenseType = 1; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": - case 2: - message.licenseType = 2; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": - case 3: - message.licenseType = 3; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "USER_LIST_LICENSE_STATUS_ENABLED": - case 1: - message.status = 1; - break; - case "USER_LIST_LICENSE_STATUS_DISABLED": - case 2: - message.status = 2; - break; - } - if (object.pricing != null) { - if (typeof object.pricing !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.pricing: object expected"); - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); - } - if (object.historicalPricings) { - if (!Array.isArray(object.historicalPricings)) - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: array expected"); - message.historicalPricings = []; - for (var i = 0; i < object.historicalPricings.length; ++i) { - if (typeof object.historicalPricings[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: object expected"); - message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); - } - } - if (object.metrics != null) { - if (typeof object.metrics !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.metrics: object expected"); - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); - } - return message; - }; - - /** - * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {google.ads.datamanager.v1.UserListGlobalLicense} message UserListGlobalLicense - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserListGlobalLicense.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.historicalPricings = []; - if (options.defaults) { - object.name = ""; - object.userListDisplayName = ""; - object.pricing = null; - object.metrics = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userListId != null && message.hasOwnProperty("userListId")) { - if (typeof message.userListId === "number") - object.userListId = options.longs === String ? String(message.userListId) : message.userListId; - else - object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; - if (options.oneofs) - object._userListId = "userListId"; - } - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - object.userListDisplayName = message.userListDisplayName; - if (message.licenseType != null && message.hasOwnProperty("licenseType")) { - object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; - if (options.oneofs) - object._licenseType = "licenseType"; - } - if (message.status != null && message.hasOwnProperty("status")) { - object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; - if (options.oneofs) - object._status = "status"; - } - if (message.pricing != null && message.hasOwnProperty("pricing")) - object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); - if (message.historicalPricings && message.historicalPricings.length) { - object.historicalPricings = []; - for (var j = 0; j < message.historicalPricings.length; ++j) - object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); - } - if (message.metrics != null && message.hasOwnProperty("metrics")) - object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); - return object; - }; - - /** - * Converts this UserListGlobalLicense to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @instance - * @returns {Object.} JSON object - */ - UserListGlobalLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserListGlobalLicense - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserListGlobalLicense - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserListGlobalLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicense"; - }; - - return UserListGlobalLicense; - })(); - - v1.UserListGlobalLicenseCustomerInfo = (function() { - - /** - * Properties of a UserListGlobalLicenseCustomerInfo. - * @memberof google.ads.datamanager.v1 - * @interface IUserListGlobalLicenseCustomerInfo - * @property {string|null} [name] UserListGlobalLicenseCustomerInfo name - * @property {number|Long|null} [userListId] UserListGlobalLicenseCustomerInfo userListId - * @property {string|null} [userListDisplayName] UserListGlobalLicenseCustomerInfo userListDisplayName - * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicenseCustomerInfo licenseType - * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicenseCustomerInfo status - * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicenseCustomerInfo pricing - * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListGlobalLicenseCustomerInfo clientAccountType - * @property {number|Long|null} [clientAccountId] UserListGlobalLicenseCustomerInfo clientAccountId - * @property {string|null} [clientAccountDisplayName] UserListGlobalLicenseCustomerInfo clientAccountDisplayName - * @property {Array.|null} [historicalPricings] UserListGlobalLicenseCustomerInfo historicalPricings - * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicenseCustomerInfo metrics - */ - - /** - * Constructs a new UserListGlobalLicenseCustomerInfo. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListGlobalLicenseCustomerInfo. - * @implements IUserListGlobalLicenseCustomerInfo - * @constructor - * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set - */ - function UserListGlobalLicenseCustomerInfo(properties) { - this.historicalPricings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserListGlobalLicenseCustomerInfo name. - * @member {string} name - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.name = ""; - - /** - * UserListGlobalLicenseCustomerInfo userListId. - * @member {number|Long} userListId - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.userListId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListGlobalLicenseCustomerInfo userListDisplayName. - * @member {string} userListDisplayName - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.userListDisplayName = ""; - - /** - * UserListGlobalLicenseCustomerInfo licenseType. - * @member {google.ads.datamanager.v1.UserListGlobalLicenseType} licenseType - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.licenseType = 0; - - /** - * UserListGlobalLicenseCustomerInfo status. - * @member {google.ads.datamanager.v1.UserListLicenseStatus} status - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.status = 0; - - /** - * UserListGlobalLicenseCustomerInfo pricing. - * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.pricing = null; - - /** - * UserListGlobalLicenseCustomerInfo clientAccountType. - * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType} clientAccountType - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.clientAccountType = 0; - - /** - * UserListGlobalLicenseCustomerInfo clientAccountId. - * @member {number|Long} clientAccountId - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.clientAccountId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UserListGlobalLicenseCustomerInfo clientAccountDisplayName. - * @member {string} clientAccountDisplayName - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.clientAccountDisplayName = ""; - - /** - * UserListGlobalLicenseCustomerInfo historicalPricings. - * @member {Array.} historicalPricings - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.historicalPricings = $util.emptyArray; - - /** - * UserListGlobalLicenseCustomerInfo metrics. - * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - */ - UserListGlobalLicenseCustomerInfo.prototype.metrics = null; - - /** - * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo instance - */ - UserListGlobalLicenseCustomerInfo.create = function create(properties) { - return new UserListGlobalLicenseCustomerInfo(properties); - }; - - /** - * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListGlobalLicenseCustomerInfo.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); - if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); - if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); - if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.clientAccountType); - if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.clientAccountId); - if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.clientAccountDisplayName); - if (message.historicalPricings != null && message.historicalPricings.length) - for (var i = 0; i < message.historicalPricings.length; ++i) - $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) - $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserListGlobalLicenseCustomerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @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.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListGlobalLicenseCustomerInfo.decode = function decode(reader, 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.UserListGlobalLicenseCustomerInfo(); - 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.userListId = reader.int64(); - break; - } - case 3: { - message.userListDisplayName = reader.string(); - break; - } - case 4: { - message.licenseType = reader.int32(); - break; - } - case 5: { - message.status = reader.int32(); - break; - } - case 6: { - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); - break; - } - case 7: { - message.clientAccountType = reader.int32(); - break; - } - case 8: { - message.clientAccountId = reader.int64(); - break; - } - case 9: { - message.clientAccountDisplayName = reader.string(); - break; - } - case 10: { - if (!(message.historicalPricings && message.historicalPricings.length)) - message.historicalPricings = []; - message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); - break; - } - case 11: { - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserListGlobalLicenseCustomerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserListGlobalLicenseCustomerInfo message. - * @function verify - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserListGlobalLicenseCustomerInfo.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.userListId != null && message.hasOwnProperty("userListId")) - if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) - return "userListId: integer|Long expected"; - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - if (!$util.isString(message.userListDisplayName)) - return "userListDisplayName: string expected"; - if (message.licenseType != null && message.hasOwnProperty("licenseType")) - switch (message.licenseType) { - default: - return "licenseType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - 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.pricing != null && message.hasOwnProperty("pricing")) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); - if (error) - return "pricing." + error; - } - if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) - switch (message.clientAccountType) { - default: - return "clientAccountType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) - if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) - return "clientAccountId: integer|Long expected"; - if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) - if (!$util.isString(message.clientAccountDisplayName)) - return "clientAccountDisplayName: string expected"; - if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { - if (!Array.isArray(message.historicalPricings)) - return "historicalPricings: array expected"; - for (var i = 0; i < message.historicalPricings.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); - if (error) - return "historicalPricings." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); - if (error) - return "metrics." + error; - } - return null; - }; - - /** - * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo - */ - UserListGlobalLicenseCustomerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo) - return object; - var message = new $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.userListId != null) - if ($util.Long) - (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; - else if (typeof object.userListId === "string") - message.userListId = parseInt(object.userListId, 10); - else if (typeof object.userListId === "number") - message.userListId = object.userListId; - else if (typeof object.userListId === "object") - message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); - if (object.userListDisplayName != null) - message.userListDisplayName = String(object.userListDisplayName); - switch (object.licenseType) { - default: - if (typeof object.licenseType === "number") { - message.licenseType = object.licenseType; - break; - } - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": - case 0: - message.licenseType = 0; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": - case 1: - message.licenseType = 1; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": - case 2: - message.licenseType = 2; - break; - case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": - case 3: - message.licenseType = 3; - break; - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "USER_LIST_LICENSE_STATUS_ENABLED": - case 1: - message.status = 1; - break; - case "USER_LIST_LICENSE_STATUS_DISABLED": - case 2: - message.status = 2; - break; - } - if (object.pricing != null) { - if (typeof object.pricing !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.pricing: object expected"); - message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); - } - switch (object.clientAccountType) { - default: - if (typeof object.clientAccountType === "number") { - message.clientAccountType = object.clientAccountType; - break; - } - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": - case 0: - message.clientAccountType = 0; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": - case 1: - message.clientAccountType = 1; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": - case 2: - message.clientAccountType = 2; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": - case 3: - message.clientAccountType = 3; - break; - case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": - case 4: - message.clientAccountType = 4; - break; - } - if (object.clientAccountId != null) - if ($util.Long) - (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; - else if (typeof object.clientAccountId === "string") - message.clientAccountId = parseInt(object.clientAccountId, 10); - else if (typeof object.clientAccountId === "number") - message.clientAccountId = object.clientAccountId; - else if (typeof object.clientAccountId === "object") - message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); - if (object.clientAccountDisplayName != null) - message.clientAccountDisplayName = String(object.clientAccountDisplayName); - if (object.historicalPricings) { - if (!Array.isArray(object.historicalPricings)) - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: array expected"); - message.historicalPricings = []; - for (var i = 0; i < object.historicalPricings.length; ++i) { - if (typeof object.historicalPricings[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: object expected"); - message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); - } - } - if (object.metrics != null) { - if (typeof object.metrics !== "object") - throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.metrics: object expected"); - message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); - } - return message; - }; - - /** - * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserListGlobalLicenseCustomerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.historicalPricings = []; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.userListId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.userListId = options.longs === String ? "0" : 0; - object.userListDisplayName = ""; - object.licenseType = options.enums === String ? "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED" : 0; - object.status = options.enums === String ? "USER_LIST_LICENSE_STATUS_UNSPECIFIED" : 0; - object.pricing = null; - object.clientAccountType = options.enums === String ? "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.clientAccountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.clientAccountId = options.longs === String ? "0" : 0; - object.clientAccountDisplayName = ""; - object.metrics = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userListId != null && message.hasOwnProperty("userListId")) - if (typeof message.userListId === "number") - object.userListId = options.longs === String ? String(message.userListId) : message.userListId; - else - object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; - if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) - object.userListDisplayName = message.userListDisplayName; - if (message.licenseType != null && message.hasOwnProperty("licenseType")) - object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; - if (message.pricing != null && message.hasOwnProperty("pricing")) - object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); - if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) - object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; - if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) - if (typeof message.clientAccountId === "number") - object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; - else - object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; - if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) - object.clientAccountDisplayName = message.clientAccountDisplayName; - if (message.historicalPricings && message.historicalPricings.length) { - object.historicalPricings = []; - for (var j = 0; j < message.historicalPricings.length; ++j) - object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); - } - if (message.metrics != null && message.hasOwnProperty("metrics")) - object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); - return object; - }; - - /** - * Converts this UserListGlobalLicenseCustomerInfo to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @instance - * @returns {Object.} JSON object - */ - UserListGlobalLicenseCustomerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserListGlobalLicenseCustomerInfo - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserListGlobalLicenseCustomerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo"; - }; - - return UserListGlobalLicenseCustomerInfo; - })(); - - /** - * UserListGlobalLicenseType enum. - * @name google.ads.datamanager.v1.UserListGlobalLicenseType - * @enum {number} - * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED=0 USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED value - * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER=1 USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER value - * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE=2 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE value - * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE=3 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE value - */ - v1.UserListGlobalLicenseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER"] = 1; - values[valuesById[2] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE"] = 2; - values[valuesById[3] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE"] = 3; - return values; - })(); - - v1.UserListGlobalLicenseService = (function() { - - /** - * Constructs a new UserListGlobalLicenseService service. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListGlobalLicenseService - * @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 UserListGlobalLicenseService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (UserListGlobalLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListGlobalLicenseService; - - /** - * Creates new UserListGlobalLicenseService service using the specified rpc implementation. - * @function create - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @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 {UserListGlobalLicenseService} RPC service. Useful where requests and/or responses are streamed. - */ - UserListGlobalLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @typedef CreateUserListGlobalLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense - */ - - /** - * Calls CreateUserListGlobalLicense. - * @function createUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListGlobalLicenseService.prototype.createUserListGlobalLicense = function createUserListGlobalLicense(request, callback) { - return this.rpcCall(createUserListGlobalLicense, $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); - }, "name", { value: "CreateUserListGlobalLicense" }); - - /** - * Calls CreateUserListGlobalLicense. - * @function createUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @typedef UpdateUserListGlobalLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense - */ - - /** - * Calls UpdateUserListGlobalLicense. - * @function updateUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListGlobalLicenseService.prototype.updateUserListGlobalLicense = function updateUserListGlobalLicense(request, callback) { - return this.rpcCall(updateUserListGlobalLicense, $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); - }, "name", { value: "UpdateUserListGlobalLicense" }); - - /** - * Calls UpdateUserListGlobalLicense. - * @function updateUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @typedef GetUserListGlobalLicenseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense - */ - - /** - * Calls GetUserListGlobalLicense. - * @function getUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object - * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListGlobalLicenseService.prototype.getUserListGlobalLicense = function getUserListGlobalLicense(request, callback) { - return this.rpcCall(getUserListGlobalLicense, $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); - }, "name", { value: "GetUserListGlobalLicense" }); - - /** - * Calls GetUserListGlobalLicense. - * @function getUserListGlobalLicense - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @typedef ListUserListGlobalLicensesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} [response] ListUserListGlobalLicensesResponse - */ - - /** - * Calls ListUserListGlobalLicenses. - * @function listUserListGlobalLicenses - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object - * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenses = function listUserListGlobalLicenses(request, callback) { - return this.rpcCall(listUserListGlobalLicenses, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, request, callback); - }, "name", { value: "ListUserListGlobalLicenses" }); - - /** - * Calls ListUserListGlobalLicenses. - * @function listUserListGlobalLicenses - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @typedef ListUserListGlobalLicenseCustomerInfosCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} [response] ListUserListGlobalLicenseCustomerInfosResponse - */ - - /** - * Calls ListUserListGlobalLicenseCustomerInfos. - * @function listUserListGlobalLicenseCustomerInfos - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object - * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenseCustomerInfos = function listUserListGlobalLicenseCustomerInfos(request, callback) { - return this.rpcCall(listUserListGlobalLicenseCustomerInfos, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, request, callback); - }, "name", { value: "ListUserListGlobalLicenseCustomerInfos" }); - - /** - * Calls ListUserListGlobalLicenseCustomerInfos. - * @function listUserListGlobalLicenseCustomerInfos - * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService - * @instance - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return UserListGlobalLicenseService; - })(); - - v1.CreateUserListGlobalLicenseRequest = (function() { - - /** - * Properties of a CreateUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface ICreateUserListGlobalLicenseRequest - * @property {string|null} [parent] CreateUserListGlobalLicenseRequest parent - * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] CreateUserListGlobalLicenseRequest userListGlobalLicense - */ - - /** - * Constructs a new CreateUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a CreateUserListGlobalLicenseRequest. - * @implements ICreateUserListGlobalLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set - */ - function CreateUserListGlobalLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserListGlobalLicenseRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @instance - */ - CreateUserListGlobalLicenseRequest.prototype.parent = ""; - - /** - * CreateUserListGlobalLicenseRequest userListGlobalLicense. - * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @instance - */ - CreateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; - - /** - * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest instance - */ - CreateUserListGlobalLicenseRequest.create = function create(properties) { - return new CreateUserListGlobalLicenseRequest(properties); - }; - - /** - * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) - $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @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.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListGlobalLicenseRequest.decode = function decode(reader, 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.CreateUserListGlobalLicenseRequest(); - 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.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserListGlobalLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { - var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); - if (error) - return "userListGlobalLicense." + error; - } - return null; - }; - - /** - * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest - */ - CreateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userListGlobalLicense != null) { - if (typeof object.userListGlobalLicense !== "object") - throw TypeError(".google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); - message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userListGlobalLicense = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) - object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); - return object; - }; - - /** - * Converts this CreateUserListGlobalLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserListGlobalLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest"; - }; - - return CreateUserListGlobalLicenseRequest; - })(); - - v1.UpdateUserListGlobalLicenseRequest = (function() { - - /** - * Properties of an UpdateUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface IUpdateUserListGlobalLicenseRequest - * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] UpdateUserListGlobalLicenseRequest userListGlobalLicense - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListGlobalLicenseRequest updateMask - */ - - /** - * Constructs a new UpdateUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an UpdateUserListGlobalLicenseRequest. - * @implements IUpdateUserListGlobalLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set - */ - function UpdateUserListGlobalLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserListGlobalLicenseRequest userListGlobalLicense. - * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @instance - */ - UpdateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; - - /** - * UpdateUserListGlobalLicenseRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @instance - */ - UpdateUserListGlobalLicenseRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest instance - */ - UpdateUserListGlobalLicenseRequest.create = function create(properties) { - return new UpdateUserListGlobalLicenseRequest(properties); - }; - - /** - * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListGlobalLicenseRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) - $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, 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 UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @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.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListGlobalLicenseRequest.decode = function decode(reader, 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.UpdateUserListGlobalLicenseRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.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 UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserListGlobalLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserListGlobalLicenseRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { - var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); - if (error) - return "userListGlobalLicense." + 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest - */ - UpdateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest(); - if (object.userListGlobalLicense != null) { - if (typeof object.userListGlobalLicense !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); - message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userListGlobalLicense = null; - object.updateMask = null; - } - if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) - object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateUserListGlobalLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserListGlobalLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest"; - }; - - return UpdateUserListGlobalLicenseRequest; - })(); - - v1.GetUserListGlobalLicenseRequest = (function() { - - /** - * Properties of a GetUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @interface IGetUserListGlobalLicenseRequest - * @property {string|null} [name] GetUserListGlobalLicenseRequest name - */ - - /** - * Constructs a new GetUserListGlobalLicenseRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a GetUserListGlobalLicenseRequest. - * @implements IGetUserListGlobalLicenseRequest - * @constructor - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set - */ - function GetUserListGlobalLicenseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserListGlobalLicenseRequest name. - * @member {string} name - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @instance - */ - GetUserListGlobalLicenseRequest.prototype.name = ""; - - /** - * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest instance - */ - GetUserListGlobalLicenseRequest.create = function create(properties) { - return new GetUserListGlobalLicenseRequest(properties); - }; - - /** - * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @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.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListGlobalLicenseRequest.decode = function decode(reader, 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.GetUserListGlobalLicenseRequest(); - 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 GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserListGlobalLicenseRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest - */ - GetUserListGlobalLicenseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest) - return object; - var message = new $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserListGlobalLicenseRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListGlobalLicenseRequest"; - }; - - return GetUserListGlobalLicenseRequest; - })(); - - v1.ListUserListGlobalLicensesRequest = (function() { - - /** - * Properties of a ListUserListGlobalLicensesRequest. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListGlobalLicensesRequest - * @property {string|null} [parent] ListUserListGlobalLicensesRequest parent - * @property {string|null} [filter] ListUserListGlobalLicensesRequest filter - * @property {number|null} [pageSize] ListUserListGlobalLicensesRequest pageSize - * @property {string|null} [pageToken] ListUserListGlobalLicensesRequest pageToken - */ - - /** - * Constructs a new ListUserListGlobalLicensesRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListGlobalLicensesRequest. - * @implements IListUserListGlobalLicensesRequest - * @constructor - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set - */ - function ListUserListGlobalLicensesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListGlobalLicensesRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @instance - */ - ListUserListGlobalLicensesRequest.prototype.parent = ""; - - /** - * ListUserListGlobalLicensesRequest filter. - * @member {string} filter - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @instance - */ - ListUserListGlobalLicensesRequest.prototype.filter = ""; - - /** - * ListUserListGlobalLicensesRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @instance - */ - ListUserListGlobalLicensesRequest.prototype.pageSize = 0; - - /** - * ListUserListGlobalLicensesRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @instance - */ - ListUserListGlobalLicensesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest instance - */ - ListUserListGlobalLicensesRequest.create = function create(properties) { - return new ListUserListGlobalLicensesRequest(properties); - }; - - /** - * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - 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); - return writer; - }; - - /** - * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @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.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicensesRequest.decode = function decode(reader, 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.ListUserListGlobalLicensesRequest(); - 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.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicensesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListGlobalLicensesRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListGlobalLicensesRequest.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.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 ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest - */ - ListUserListGlobalLicensesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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 ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListGlobalLicensesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - return object; - }; - - /** - * Converts this ListUserListGlobalLicensesRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserListGlobalLicensesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListGlobalLicensesRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListGlobalLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesRequest"; - }; - - return ListUserListGlobalLicensesRequest; - })(); - - v1.ListUserListGlobalLicensesResponse = (function() { - - /** - * Properties of a ListUserListGlobalLicensesResponse. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListGlobalLicensesResponse - * @property {Array.|null} [userListGlobalLicenses] ListUserListGlobalLicensesResponse userListGlobalLicenses - * @property {string|null} [nextPageToken] ListUserListGlobalLicensesResponse nextPageToken - */ - - /** - * Constructs a new ListUserListGlobalLicensesResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListGlobalLicensesResponse. - * @implements IListUserListGlobalLicensesResponse - * @constructor - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set - */ - function ListUserListGlobalLicensesResponse(properties) { - this.userListGlobalLicenses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListGlobalLicensesResponse userListGlobalLicenses. - * @member {Array.} userListGlobalLicenses - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @instance - */ - ListUserListGlobalLicensesResponse.prototype.userListGlobalLicenses = $util.emptyArray; - - /** - * ListUserListGlobalLicensesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @instance - */ - ListUserListGlobalLicensesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse instance - */ - ListUserListGlobalLicensesResponse.create = function create(properties) { - return new ListUserListGlobalLicensesResponse(properties); - }; - - /** - * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicensesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userListGlobalLicenses != null && message.userListGlobalLicenses.length) - for (var i = 0; i < message.userListGlobalLicenses.length; ++i) - $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicenses[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 ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @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.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicensesResponse.decode = function decode(reader, 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.ListUserListGlobalLicensesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.userListGlobalLicenses && message.userListGlobalLicenses.length)) - message.userListGlobalLicenses = []; - message.userListGlobalLicenses.push($root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicensesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListGlobalLicensesResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListGlobalLicensesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userListGlobalLicenses != null && message.hasOwnProperty("userListGlobalLicenses")) { - if (!Array.isArray(message.userListGlobalLicenses)) - return "userListGlobalLicenses: array expected"; - for (var i = 0; i < message.userListGlobalLicenses.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicenses[i]); - if (error) - return "userListGlobalLicenses." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse - */ - ListUserListGlobalLicensesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse(); - if (object.userListGlobalLicenses) { - if (!Array.isArray(object.userListGlobalLicenses)) - throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: array expected"); - message.userListGlobalLicenses = []; - for (var i = 0; i < object.userListGlobalLicenses.length; ++i) { - if (typeof object.userListGlobalLicenses[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: object expected"); - message.userListGlobalLicenses[i] = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicenses[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListGlobalLicensesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userListGlobalLicenses = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userListGlobalLicenses && message.userListGlobalLicenses.length) { - object.userListGlobalLicenses = []; - for (var j = 0; j < message.userListGlobalLicenses.length; ++j) - object.userListGlobalLicenses[j] = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicenses[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserListGlobalLicensesResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserListGlobalLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListGlobalLicensesResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListGlobalLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesResponse"; - }; - - return ListUserListGlobalLicensesResponse; - })(); - - v1.ListUserListGlobalLicenseCustomerInfosRequest = (function() { - - /** - * Properties of a ListUserListGlobalLicenseCustomerInfosRequest. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListGlobalLicenseCustomerInfosRequest - * @property {string|null} [parent] ListUserListGlobalLicenseCustomerInfosRequest parent - * @property {string|null} [filter] ListUserListGlobalLicenseCustomerInfosRequest filter - * @property {number|null} [pageSize] ListUserListGlobalLicenseCustomerInfosRequest pageSize - * @property {string|null} [pageToken] ListUserListGlobalLicenseCustomerInfosRequest pageToken - */ - - /** - * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosRequest. - * @implements IListUserListGlobalLicenseCustomerInfosRequest - * @constructor - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set - */ - function ListUserListGlobalLicenseCustomerInfosRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListGlobalLicenseCustomerInfosRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @instance - */ - ListUserListGlobalLicenseCustomerInfosRequest.prototype.parent = ""; - - /** - * ListUserListGlobalLicenseCustomerInfosRequest filter. - * @member {string} filter - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @instance - */ - ListUserListGlobalLicenseCustomerInfosRequest.prototype.filter = ""; - - /** - * ListUserListGlobalLicenseCustomerInfosRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @instance - */ - ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageSize = 0; - - /** - * ListUserListGlobalLicenseCustomerInfosRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @instance - */ - ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest instance - */ - ListUserListGlobalLicenseCustomerInfosRequest.create = function create(properties) { - return new ListUserListGlobalLicenseCustomerInfosRequest(properties); - }; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicenseCustomerInfosRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - 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); - return writer; - }; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicenseCustomerInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @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.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicenseCustomerInfosRequest.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosRequest(); - 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.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicenseCustomerInfosRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListGlobalLicenseCustomerInfosRequest.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.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 ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest - */ - ListUserListGlobalLicenseCustomerInfosRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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 ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListGlobalLicenseCustomerInfosRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; - return object; - }; - - /** - * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserListGlobalLicenseCustomerInfosRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListGlobalLicenseCustomerInfosRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest"; - }; - - return ListUserListGlobalLicenseCustomerInfosRequest; - })(); - - v1.ListUserListGlobalLicenseCustomerInfosResponse = (function() { - - /** - * Properties of a ListUserListGlobalLicenseCustomerInfosResponse. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListGlobalLicenseCustomerInfosResponse - * @property {Array.|null} [userListGlobalLicenseCustomerInfos] ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos - * @property {string|null} [nextPageToken] ListUserListGlobalLicenseCustomerInfosResponse nextPageToken - */ - - /** - * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosResponse. - * @implements IListUserListGlobalLicenseCustomerInfosResponse - * @constructor - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set - */ - function ListUserListGlobalLicenseCustomerInfosResponse(properties) { - this.userListGlobalLicenseCustomerInfos = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. - * @member {Array.} userListGlobalLicenseCustomerInfos - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @instance - */ - ListUserListGlobalLicenseCustomerInfosResponse.prototype.userListGlobalLicenseCustomerInfos = $util.emptyArray; - - /** - * ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @instance - */ - ListUserListGlobalLicenseCustomerInfosResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse instance - */ - ListUserListGlobalLicenseCustomerInfosResponse.create = function create(properties) { - return new ListUserListGlobalLicenseCustomerInfosResponse(properties); - }; - - /** - * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicenseCustomerInfosResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userListGlobalLicenseCustomerInfos != null && message.userListGlobalLicenseCustomerInfos.length) - for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) - $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.encode(message.userListGlobalLicenseCustomerInfos[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 ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListGlobalLicenseCustomerInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @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.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicenseCustomerInfosResponse.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length)) - message.userListGlobalLicenseCustomerInfos = []; - message.userListGlobalLicenseCustomerInfos.push($root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListGlobalLicenseCustomerInfosResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListGlobalLicenseCustomerInfosResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userListGlobalLicenseCustomerInfos != null && message.hasOwnProperty("userListGlobalLicenseCustomerInfos")) { - if (!Array.isArray(message.userListGlobalLicenseCustomerInfos)) - return "userListGlobalLicenseCustomerInfos: array expected"; - for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify(message.userListGlobalLicenseCustomerInfos[i]); - if (error) - return "userListGlobalLicenseCustomerInfos." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse - */ - ListUserListGlobalLicenseCustomerInfosResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse(); - if (object.userListGlobalLicenseCustomerInfos) { - if (!Array.isArray(object.userListGlobalLicenseCustomerInfos)) - throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: array expected"); - message.userListGlobalLicenseCustomerInfos = []; - for (var i = 0; i < object.userListGlobalLicenseCustomerInfos.length; ++i) { - if (typeof object.userListGlobalLicenseCustomerInfos[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: object expected"); - message.userListGlobalLicenseCustomerInfos[i] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.fromObject(object.userListGlobalLicenseCustomerInfos[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListGlobalLicenseCustomerInfosResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userListGlobalLicenseCustomerInfos = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length) { - object.userListGlobalLicenseCustomerInfos = []; - for (var j = 0; j < message.userListGlobalLicenseCustomerInfos.length; ++j) - object.userListGlobalLicenseCustomerInfos[j] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.toObject(message.userListGlobalLicenseCustomerInfos[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserListGlobalLicenseCustomerInfosResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListGlobalLicenseCustomerInfosResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse"; - }; - - return ListUserListGlobalLicenseCustomerInfosResponse; - })(); - - v1.UserListService = (function() { - - /** - * Constructs a new UserListService service. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a UserListService - * @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 UserListService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (UserListService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListService; - - /** - * Creates new UserListService service using the specified rpc implementation. - * @function create - * @memberof google.ads.datamanager.v1.UserListService - * @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 {UserListService} RPC service. Useful where requests and/or responses are streamed. - */ - UserListService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. - * @memberof google.ads.datamanager.v1.UserListService - * @typedef GetUserListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserList} [response] UserList - */ - - /** - * Calls GetUserList. - * @function getUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object - * @param {google.ads.datamanager.v1.UserListService.GetUserListCallback} callback Node-style callback called with the error, if any, and UserList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListService.prototype.getUserList = function getUserList(request, callback) { - return this.rpcCall(getUserList, $root.google.ads.datamanager.v1.GetUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); - }, "name", { value: "GetUserList" }); - - /** - * Calls GetUserList. - * @function getUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. - * @memberof google.ads.datamanager.v1.UserListService - * @typedef ListUserListsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.ListUserListsResponse} [response] ListUserListsResponse - */ - - /** - * Calls ListUserLists. - * @function listUserLists - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object - * @param {google.ads.datamanager.v1.UserListService.ListUserListsCallback} callback Node-style callback called with the error, if any, and ListUserListsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListService.prototype.listUserLists = function listUserLists(request, callback) { - return this.rpcCall(listUserLists, $root.google.ads.datamanager.v1.ListUserListsRequest, $root.google.ads.datamanager.v1.ListUserListsResponse, request, callback); - }, "name", { value: "ListUserLists" }); - - /** - * Calls ListUserLists. - * @function listUserLists - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. - * @memberof google.ads.datamanager.v1.UserListService - * @typedef CreateUserListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserList} [response] UserList - */ - - /** - * Calls CreateUserList. - * @function createUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object - * @param {google.ads.datamanager.v1.UserListService.CreateUserListCallback} callback Node-style callback called with the error, if any, and UserList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListService.prototype.createUserList = function createUserList(request, callback) { - return this.rpcCall(createUserList, $root.google.ads.datamanager.v1.CreateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); - }, "name", { value: "CreateUserList" }); - - /** - * Calls CreateUserList. - * @function createUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. - * @memberof google.ads.datamanager.v1.UserListService - * @typedef UpdateUserListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.ads.datamanager.v1.UserList} [response] UserList - */ - - /** - * Calls UpdateUserList. - * @function updateUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object - * @param {google.ads.datamanager.v1.UserListService.UpdateUserListCallback} callback Node-style callback called with the error, if any, and UserList - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListService.prototype.updateUserList = function updateUserList(request, callback) { - return this.rpcCall(updateUserList, $root.google.ads.datamanager.v1.UpdateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); - }, "name", { value: "UpdateUserList" }); - - /** - * Calls UpdateUserList. - * @function updateUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. - * @memberof google.ads.datamanager.v1.UserListService - * @typedef DeleteUserListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUserList. - * @function deleteUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object - * @param {google.ads.datamanager.v1.UserListService.DeleteUserListCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UserListService.prototype.deleteUserList = function deleteUserList(request, callback) { - return this.rpcCall(deleteUserList, $root.google.ads.datamanager.v1.DeleteUserListRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUserList" }); - - /** - * Calls DeleteUserList. - * @function deleteUserList - * @memberof google.ads.datamanager.v1.UserListService - * @instance - * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return UserListService; - })(); - - v1.GetUserListRequest = (function() { - - /** - * Properties of a GetUserListRequest. - * @memberof google.ads.datamanager.v1 - * @interface IGetUserListRequest - * @property {string|null} [name] GetUserListRequest name - */ - - /** - * Constructs a new GetUserListRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a GetUserListRequest. - * @implements IGetUserListRequest - * @constructor - * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set - */ - function GetUserListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserListRequest name. - * @member {string} name - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @instance - */ - GetUserListRequest.prototype.name = ""; - - /** - * Creates a new GetUserListRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest instance - */ - GetUserListRequest.create = function create(properties) { - return new GetUserListRequest(properties); - }; - - /** - * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListRequest.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 GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @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.GetUserListRequest} GetUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListRequest.decode = function decode(reader, 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.GetUserListRequest(); - 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 GetUserListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserListRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserListRequest.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 GetUserListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest - */ - GetUserListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.GetUserListRequest) - return object; - var message = new $root.google.ads.datamanager.v1.GetUserListRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {google.ads.datamanager.v1.GetUserListRequest} message GetUserListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserListRequest.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 GetUserListRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserListRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.GetUserListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListRequest"; - }; - - return GetUserListRequest; - })(); - - v1.ListUserListsRequest = (function() { - - /** - * Properties of a ListUserListsRequest. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListsRequest - * @property {string|null} [parent] ListUserListsRequest parent - * @property {number|null} [pageSize] ListUserListsRequest pageSize - * @property {string|null} [pageToken] ListUserListsRequest pageToken - * @property {string|null} [filter] ListUserListsRequest filter - */ - - /** - * Constructs a new ListUserListsRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListsRequest. - * @implements IListUserListsRequest - * @constructor - * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set - */ - function ListUserListsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListsRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @instance - */ - ListUserListsRequest.prototype.parent = ""; - - /** - * ListUserListsRequest pageSize. - * @member {number} pageSize - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @instance - */ - ListUserListsRequest.prototype.pageSize = 0; - - /** - * ListUserListsRequest pageToken. - * @member {string} pageToken - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @instance - */ - ListUserListsRequest.prototype.pageToken = ""; - - /** - * ListUserListsRequest filter. - * @member {string} filter - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @instance - */ - ListUserListsRequest.prototype.filter = ""; - - /** - * Creates a new ListUserListsRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest instance - */ - ListUserListsRequest.create = function create(properties) { - return new ListUserListsRequest(properties); - }; - - /** - * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @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.ListUserListsRequest} ListUserListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListsRequest.decode = function decode(reader, 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.ListUserListsRequest(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListsRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListsRequest.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"; - return null; - }; - - /** - * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest - */ - ListUserListsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListsRequest) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListsRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {google.ads.datamanager.v1.ListUserListsRequest} message ListUserListsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this ListUserListsRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserListsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListsRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsRequest"; - }; - - return ListUserListsRequest; - })(); - - v1.ListUserListsResponse = (function() { - - /** - * Properties of a ListUserListsResponse. - * @memberof google.ads.datamanager.v1 - * @interface IListUserListsResponse - * @property {Array.|null} [userLists] ListUserListsResponse userLists - * @property {string|null} [nextPageToken] ListUserListsResponse nextPageToken - */ - - /** - * Constructs a new ListUserListsResponse. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a ListUserListsResponse. - * @implements IListUserListsResponse - * @constructor - * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set - */ - function ListUserListsResponse(properties) { - this.userLists = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserListsResponse userLists. - * @member {Array.} userLists - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @instance - */ - ListUserListsResponse.prototype.userLists = $util.emptyArray; - - /** - * ListUserListsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @instance - */ - ListUserListsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserListsResponse instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse instance - */ - ListUserListsResponse.create = function create(properties) { - return new ListUserListsResponse(properties); - }; - - /** - * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userLists != null && message.userLists.length) - for (var i = 0; i < message.userLists.length; ++i) - $root.google.ads.datamanager.v1.UserList.encode(message.userLists[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 ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserListsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserListsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @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.ListUserListsResponse} ListUserListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListsResponse.decode = function decode(reader, 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.ListUserListsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.userLists && message.userLists.length)) - message.userLists = []; - message.userLists.push($root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserListsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserListsResponse message. - * @function verify - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserListsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userLists != null && message.hasOwnProperty("userLists")) { - if (!Array.isArray(message.userLists)) - return "userLists: array expected"; - for (var i = 0; i < message.userLists.length; ++i) { - var error = $root.google.ads.datamanager.v1.UserList.verify(message.userLists[i]); - if (error) - return "userLists." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse - */ - ListUserListsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ListUserListsResponse) - return object; - var message = new $root.google.ads.datamanager.v1.ListUserListsResponse(); - if (object.userLists) { - if (!Array.isArray(object.userLists)) - throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: array expected"); - message.userLists = []; - for (var i = 0; i < object.userLists.length; ++i) { - if (typeof object.userLists[i] !== "object") - throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: object expected"); - message.userLists[i] = $root.google.ads.datamanager.v1.UserList.fromObject(object.userLists[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {google.ads.datamanager.v1.ListUserListsResponse} message ListUserListsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserListsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userLists = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userLists && message.userLists.length) { - object.userLists = []; - for (var j = 0; j < message.userLists.length; ++j) - object.userLists[j] = $root.google.ads.datamanager.v1.UserList.toObject(message.userLists[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserListsResponse to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserListsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserListsResponse - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ListUserListsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsResponse"; - }; - - return ListUserListsResponse; - })(); - - v1.CreateUserListRequest = (function() { - - /** - * Properties of a CreateUserListRequest. - * @memberof google.ads.datamanager.v1 - * @interface ICreateUserListRequest - * @property {string|null} [parent] CreateUserListRequest parent - * @property {google.ads.datamanager.v1.IUserList|null} [userList] CreateUserListRequest userList - * @property {boolean|null} [validateOnly] CreateUserListRequest validateOnly - */ - - /** - * Constructs a new CreateUserListRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a CreateUserListRequest. - * @implements ICreateUserListRequest - * @constructor - * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set - */ - function CreateUserListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserListRequest parent. - * @member {string} parent - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @instance - */ - CreateUserListRequest.prototype.parent = ""; - - /** - * CreateUserListRequest userList. - * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @instance - */ - CreateUserListRequest.prototype.userList = null; - - /** - * CreateUserListRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @instance - */ - CreateUserListRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateUserListRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest instance - */ - CreateUserListRequest.create = function create(properties) { - return new CreateUserListRequest(properties); - }; - - /** - * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListRequest.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.userList != null && Object.hasOwnProperty.call(message, "userList")) - $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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); - return writer; - }; - - /** - * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @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.CreateUserListRequest} CreateUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListRequest.decode = function decode(reader, 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.CreateUserListRequest(); - 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.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserListRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserListRequest.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.userList != null && message.hasOwnProperty("userList")) { - var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); - if (error) - return "userList." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest - */ - CreateUserListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.CreateUserListRequest) - return object; - var message = new $root.google.ads.datamanager.v1.CreateUserListRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userList != null) { - if (typeof object.userList !== "object") - throw TypeError(".google.ads.datamanager.v1.CreateUserListRequest.userList: object expected"); - message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {google.ads.datamanager.v1.CreateUserListRequest} message CreateUserListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userList = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userList != null && message.hasOwnProperty("userList")) - object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateUserListRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserListRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.CreateUserListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListRequest"; - }; - - return CreateUserListRequest; - })(); - - v1.UpdateUserListRequest = (function() { - - /** - * Properties of an UpdateUserListRequest. - * @memberof google.ads.datamanager.v1 - * @interface IUpdateUserListRequest - * @property {google.ads.datamanager.v1.IUserList|null} [userList] UpdateUserListRequest userList - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListRequest updateMask - * @property {boolean|null} [validateOnly] UpdateUserListRequest validateOnly - */ - - /** - * Constructs a new UpdateUserListRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents an UpdateUserListRequest. - * @implements IUpdateUserListRequest - * @constructor - * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set - */ - function UpdateUserListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserListRequest userList. - * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @instance - */ - UpdateUserListRequest.prototype.userList = null; - - /** - * UpdateUserListRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @instance - */ - UpdateUserListRequest.prototype.updateMask = null; - - /** - * UpdateUserListRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @instance - */ - UpdateUserListRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateUserListRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest instance - */ - UpdateUserListRequest.create = function create(properties) { - return new UpdateUserListRequest(properties); - }; - - /** - * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userList != null && Object.hasOwnProperty.call(message, "userList")) - $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @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.UpdateUserListRequest} UpdateUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListRequest.decode = function decode(reader, 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.UpdateUserListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserListRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userList != null && message.hasOwnProperty("userList")) { - var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); - if (error) - return "userList." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest - */ - UpdateUserListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListRequest) - return object; - var message = new $root.google.ads.datamanager.v1.UpdateUserListRequest(); - if (object.userList != null) { - if (typeof object.userList !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.userList: object expected"); - message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {google.ads.datamanager.v1.UpdateUserListRequest} message UpdateUserListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userList = null; - object.updateMask = null; - object.validateOnly = false; - } - if (message.userList != null && message.hasOwnProperty("userList")) - object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateUserListRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserListRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.UpdateUserListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListRequest"; - }; - - return UpdateUserListRequest; - })(); - - v1.DeleteUserListRequest = (function() { - - /** - * Properties of a DeleteUserListRequest. - * @memberof google.ads.datamanager.v1 - * @interface IDeleteUserListRequest - * @property {string|null} [name] DeleteUserListRequest name - * @property {boolean|null} [validateOnly] DeleteUserListRequest validateOnly - */ - - /** - * Constructs a new DeleteUserListRequest. - * @memberof google.ads.datamanager.v1 - * @classdesc Represents a DeleteUserListRequest. - * @implements IDeleteUserListRequest - * @constructor - * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set - */ - function DeleteUserListRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteUserListRequest name. - * @member {string} name - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @instance - */ - DeleteUserListRequest.prototype.name = ""; - - /** - * DeleteUserListRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @instance - */ - DeleteUserListRequest.prototype.validateOnly = false; - - /** - * Creates a new DeleteUserListRequest instance using the specified properties. - * @function create - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest instance - */ - DeleteUserListRequest.create = function create(properties) { - return new DeleteUserListRequest(properties); - }; - - /** - * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. - * @function encode - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserListRequest.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteUserListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @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.DeleteUserListRequest} DeleteUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserListRequest.decode = function decode(reader, 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.DeleteUserListRequest(); - 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.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteUserListRequest message. - * @function verify - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteUserListRequest.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.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest - */ - DeleteUserListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.DeleteUserListRequest) - return object; - var message = new $root.google.ads.datamanager.v1.DeleteUserListRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {google.ads.datamanager.v1.DeleteUserListRequest} message DeleteUserListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteUserListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this DeleteUserListRequest to JSON. - * @function toJSON - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteUserListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteUserListRequest - * @function getTypeUrl - * @memberof google.ads.datamanager.v1.DeleteUserListRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.ads.datamanager.v1.DeleteUserListRequest"; - }; - - return DeleteUserListRequest; - })(); - - 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.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; - })(); - - 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 - * @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 - */ - - /** - * 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; - })(); - - 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.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-ads-datamanager/protos/protos.json b/owl-bot-staging/google-ads-datamanager/protos/protos.json deleted file mode 100644 index 2fefbf18e39..00000000000 --- a/owl-bot-staging/google-ads-datamanager/protos/protos.json +++ /dev/null @@ -1,5456 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "ads": { - "nested": { - "datamanager": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Ads.DataManager.V1", - "go_package": "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb", - "java_multiple_files": true, - "java_outer_classname": "UserListServiceProto", - "java_package": "com.google.ads.datamanager.v1", - "php_namespace": "Google\\Ads\\DataManager\\V1", - "ruby_package": "Google::Ads::DataManager::V1", - "(google.api.resource_definition).type": "datamanager.googleapis.com/Account", - "(google.api.resource_definition).pattern": "accountTypes/{account_type}/accounts/{account}" - }, - "nested": { - "AgeRange": { - "values": { - "AGE_RANGE_UNSPECIFIED": 0, - "AGE_RANGE_UNKNOWN": 1, - "AGE_RANGE_18_24": 2, - "AGE_RANGE_25_34": 3, - "AGE_RANGE_35_44": 4, - "AGE_RANGE_45_54": 5, - "AGE_RANGE_55_64": 6, - "AGE_RANGE_65_UP": 7 - } - }, - "AudienceMember": { - "oneofs": { - "data": { - "oneof": [ - "userData", - "pairData", - "mobileData", - "userIdData", - "ppidData" - ] - } - }, - "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 - }, - "userIdData": { - "type": "UserIdData", - "id": 6 - }, - "ppidData": { - "type": "PpidData", - "id": 7 - }, - "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" - } - } - } - }, - "UserIdData": { - "fields": { - "userId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PpidData": { - "fields": { - "ppids": { - "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" - } - }, - "itemId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "additionalItemParameters": { - "rule": "repeated", - "type": "ItemParameter", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ItemParameter": { - "fields": { - "parameterName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "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, - "GOOGLE_ANALYTICS_PROPERTY": 5, - "GOOGLE_AD_MANAGER_AUDIENCE_LINK": 6 - } - } - } - }, - "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", - "awsWrappedKeyInfo" - ] - } - }, - "fields": { - "gcpWrappedKeyInfo": { - "type": "GcpWrappedKeyInfo", - "id": 1 - }, - "awsWrappedKeyInfo": { - "type": "AwsWrappedKeyInfo", - "id": 2 - } - } - }, - "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 - } - } - } - }, - "AwsWrappedKeyInfo": { - "fields": { - "keyType": { - "type": "KeyType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "roleArn": { - "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, - "UNSUPPORTED_OPERATING_ACCOUNT_FOR_DATA_PARTNER": 37, - "UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER": 38, - "NO_IDENTIFIERS_PROVIDED": 39, - "INVALID_PROPERTY_TYPE": 40, - "INVALID_STREAM_TYPE": 41, - "LINKED_ACCOUNT_ONLY_ALLOWED_WITH_DATA_PARTNER_LOGIN_ACCOUNT": 42, - "OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH": 43, - "EVENT_TIME_INVALID": 44, - "RESERVED_NAME_USED": 45, - "INVALID_EVENT_NAME": 46, - "NOT_ALLOWLISTED": 47, - "INVALID_REQUEST_ID": 48, - "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT": 49, - "FIELD_VALUE_TOO_LONG": 50, - "TOO_MANY_ELEMENTS": 51, - "ALREADY_EXISTS": 52, - "IMMUTABLE_FIELD_FOR_UPDATE": 53, - "INVALID_RESOURCE_NAME": 54, - "INVALID_FILTER": 55, - "INVALID_UPDATE_MASK": 56, - "INVALID_PAGE_TOKEN": 57, - "CANNOT_UPDATE_DISABLED_LICENSE": 58, - "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST": 59, - "INSUFFICIENT_COST": 60, - "CANNOT_DISABLE_LICENSE": 61, - "INVALID_CLIENT_ACCOUNT_ID": 62, - "PRICING_ONLY_ZERO_COST_ALLOWED": 63, - "PRICE_TOO_HIGH": 64, - "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE": 65, - "INVALID_PRICING_END_DATE": 66, - "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT": 67, - "MISMATCHED_ACCOUNT_TYPE": 68, - "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE": 69, - "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER": 70, - "INVALID_MEDIA_SHARE_COST": 71, - "INVALID_COST_TYPE": 72, - "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST": 73, - "MAX_COST_NOT_ALLOWED": 74, - "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED": 75, - "INVALID_DESCRIPTION": 76, - "INVALID_DISPLAY_NAME": 77, - "DISPLAY_NAME_ALREADY_USED": 78, - "OWNERSHIP_REQUIRED_FOR_UPDATE": 79, - "USER_LIST_MUTATION_NOT_SUPPORTED": 80, - "SENSITIVE_USER_LIST_IMMUTABLE": 81, - "BILLABLE_RECORD_COUNT_IMMUTABLE": 82, - "USER_LIST_NAME_RESERVED": 83, - "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA": 84, - "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE": 85, - "COMMERCE_PARTNER_NOT_ALLOWED": 86, - "UNSUPPORTED_PARTNER_AUDIENCE_INFO": 87, - "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED": 88, - "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 89, - "ADVERTISER_TOS_NOT_ACCEPTED": 90, - "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 91, - "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT": 92, - "INVALID_COMMERCE_PARTNER": 93, - "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE": 94, - "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES": 95, - "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG": 96, - "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE": 97, - "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK": 98 - } - }, - "Event": { - "oneofs": { - "_conversionValue": { - "oneof": [ - "conversionValue" - ] - } - }, - "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", - "proto3_optional": true - } - }, - "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" - } - }, - "eventName": { - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "clientId": { - "type": "string", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "userId": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "additionalEventParameters": { - "rule": "repeated", - "type": "EventParameter", - "id": 19, - "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" - } - } - } - }, - "EventParameter": { - "fields": { - "parameterName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "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" - } - }, - "additionalUserProperties": { - "rule": "repeated", - "type": "UserProperty", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UserProperty": { - "fields": { - "propertyName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "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 - } - }, - "Gender": { - "values": { - "GENDER_UNSPECIFIED": 0, - "GENDER_UNKNOWN": 1, - "GENDER_MALE": 2, - "GENDER_FEMALE": 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", - "userIdDataIngestionStatus", - "ppidDataIngestionStatus" - ] - } - }, - "fields": { - "userDataIngestionStatus": { - "type": "IngestUserDataStatus", - "id": 1 - }, - "mobileDataIngestionStatus": { - "type": "IngestMobileDataStatus", - "id": 2 - }, - "pairDataIngestionStatus": { - "type": "IngestPairDataStatus", - "id": 3 - }, - "userIdDataIngestionStatus": { - "type": "IngestUserIdDataStatus", - "id": 4 - }, - "ppidDataIngestionStatus": { - "type": "IngestPpidDataStatus", - "id": 5 - } - } - }, - "RemoveAudienceMembersStatus": { - "oneofs": { - "status": { - "oneof": [ - "userDataRemovalStatus", - "mobileDataRemovalStatus", - "pairDataRemovalStatus", - "userIdDataRemovalStatus", - "ppidDataRemovalStatus" - ] - } - }, - "fields": { - "userDataRemovalStatus": { - "type": "RemoveUserDataStatus", - "id": 1 - }, - "mobileDataRemovalStatus": { - "type": "RemoveMobileDataStatus", - "id": 2 - }, - "pairDataRemovalStatus": { - "type": "RemovePairDataStatus", - "id": 3 - }, - "userIdDataRemovalStatus": { - "type": "RemoveUserIdDataStatus", - "id": 4 - }, - "ppidDataRemovalStatus": { - "type": "RemovePpidDataStatus", - "id": 5 - } - } - }, - "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 - } - } - }, - "IngestUserIdDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 - }, - "userIdCount": { - "type": "int64", - "id": 2 - } - } - }, - "RemoveUserIdDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 - }, - "userIdCount": { - "type": "int64", - "id": 2 - } - } - }, - "IngestPpidDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 - }, - "ppidCount": { - "type": "int64", - "id": 2 - } - } - }, - "RemovePpidDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 - }, - "ppidCount": { - "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_AWS_AUTH_FAILED": 27, - "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, - "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": 9 - } - }, - "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 - } - }, - "MarketingDataInsightsService": { - "options": { - "(google.api.default_host)": "datamanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" - }, - "methods": { - "RetrieveInsights": { - "requestType": "RetrieveInsightsRequest", - "responseType": "RetrieveInsightsResponse", - "options": { - "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", - "body": "*" - } - } - ] - } - } - }, - "RetrieveInsightsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "baseline": { - "type": "Baseline", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "userListId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Baseline": { - "oneofs": { - "baseline": { - "oneof": [ - "baselineLocation", - "locationAutoDetectionEnabled" - ] - } - }, - "fields": { - "baselineLocation": { - "type": "Location", - "id": 1 - }, - "locationAutoDetectionEnabled": { - "type": "bool", - "id": 2 - } - }, - "nested": { - "Location": { - "fields": { - "regionCodes": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "RetrieveInsightsResponse": { - "fields": { - "marketingDataInsights": { - "rule": "repeated", - "type": "MarketingDataInsight", - "id": 1 - } - }, - "nested": { - "MarketingDataInsight": { - "fields": { - "dimension": { - "type": "AudienceInsightsDimension", - "id": 1 - }, - "attributes": { - "rule": "repeated", - "type": "MarketingDataInsightsAttribute", - "id": 2 - } - }, - "nested": { - "AudienceInsightsDimension": { - "values": { - "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": 0, - "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": 1, - "AFFINITY_USER_INTEREST": 2, - "IN_MARKET_USER_INTEREST": 3, - "AGE_RANGE": 4, - "GENDER": 5 - } - }, - "MarketingDataInsightsAttribute": { - "oneofs": { - "_userInterestId": { - "oneof": [ - "userInterestId" - ] - }, - "_lift": { - "oneof": [ - "lift" - ] - }, - "_ageRange": { - "oneof": [ - "ageRange" - ] - }, - "_gender": { - "oneof": [ - "gender" - ] - } - }, - "fields": { - "userInterestId": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "lift": { - "type": "float", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "ageRange": { - "type": "AgeRange", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "gender": { - "type": "Gender", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - } - } - } - } - }, - "PartnerLinkService": { - "options": { - "(google.api.default_host)": "datamanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" - }, - "methods": { - "CreatePartnerLink": { - "requestType": "CreatePartnerLinkRequest", - "responseType": "PartnerLink", - "options": { - "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", - "(google.api.http).body": "partner_link", - "(google.api.method_signature)": "parent,partner_link" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", - "body": "partner_link" - } - }, - { - "(google.api.method_signature)": "parent,partner_link" - } - ] - }, - "DeletePartnerLink": { - "requestType": "DeletePartnerLinkRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SearchPartnerLinks": { - "requestType": "SearchPartnerLinksRequest", - "responseType": "SearchPartnerLinksResponse", - "options": { - "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreatePartnerLinkRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" - } - }, - "partnerLink": { - "type": "PartnerLink", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeletePartnerLinkRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamanager.googleapis.com/PartnerLink" - } - } - } - }, - "SearchPartnerLinksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SearchPartnerLinksResponse": { - "fields": { - "partnerLinks": { - "rule": "repeated", - "type": "PartnerLink", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "PartnerLink": { - "options": { - "(google.api.resource).type": "datamanager.googleapis.com/PartnerLink", - "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}", - "(google.api.resource).plural": "partnerLinks", - "(google.api.resource).singular": "partnerLink" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "partnerLinkId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "owningAccount": { - "type": "ProductAccount", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "partnerAccount": { - "type": "ProductAccount", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UserList": { - "options": { - "(google.api.resource).type": "datamanager.googleapis.com/UserList", - "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userLists/{user_list}", - "(google.api.resource).plural": "userLists", - "(google.api.resource).singular": "userList" - }, - "oneofs": { - "_displayName": { - "oneof": [ - "displayName" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_membershipStatus": { - "oneof": [ - "membershipStatus" - ] - }, - "_integrationCode": { - "oneof": [ - "integrationCode" - ] - }, - "_closingReason": { - "oneof": [ - "closingReason" - ] - }, - "_accountAccessStatus": { - "oneof": [ - "accountAccessStatus" - ] - }, - "userListInfo": { - "oneof": [ - "ingestedUserListInfo" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "id": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "readOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "membershipStatus": { - "type": "MembershipStatus", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "integrationCode": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "membershipDuration": { - "type": "google.protobuf.Duration", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "closingReason": { - "type": "ClosingReason", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "accessReason": { - "type": "AccessReason", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "accountAccessStatus": { - "type": "AccessStatus", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "sizeInfo": { - "type": "SizeInfo", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "targetNetworkInfo": { - "type": "TargetNetworkInfo", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ingestedUserListInfo": { - "type": "IngestedUserListInfo", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "MembershipStatus": { - "values": { - "MEMBERSHIP_STATUS_UNSPECIFIED": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "ClosingReason": { - "values": { - "CLOSING_REASON_UNSPECIFIED": 0, - "UNUSED": 1 - } - }, - "AccessReason": { - "values": { - "ACCESS_REASON_UNSPECIFIED": 0, - "OWNED": 1, - "SHARED": 2, - "LICENSED": 3, - "SUBSCRIBED": 4, - "AFFILIATED": 5 - } - }, - "AccessStatus": { - "values": { - "ACCESS_STATUS_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - } - } - }, - "SizeInfo": { - "fields": { - "displayNetworkMembersCount": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "searchNetworkMembersCount": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "TargetNetworkInfo": { - "oneofs": { - "_eligibleForSearch": { - "oneof": [ - "eligibleForSearch" - ] - } - }, - "fields": { - "eligibleForDisplay": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "eligibleForSearch": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "IngestedUserListInfo": { - "fields": { - "uploadKeyTypes": { - "rule": "repeated", - "type": "UploadKeyType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "contactIdInfo": { - "type": "ContactIdInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mobileIdInfo": { - "type": "MobileIdInfo", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "userIdInfo": { - "type": "UserIdInfo", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pairIdInfo": { - "type": "PairIdInfo", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pseudonymousIdInfo": { - "type": "PseudonymousIdInfo", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "partnerAudienceInfo": { - "type": "PartnerAudienceInfo", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "UploadKeyType": { - "values": { - "UPLOAD_KEY_TYPE_UNSPECIFIED": 0, - "CONTACT_ID": 1, - "MOBILE_ID": 2, - "USER_ID": 3, - "PAIR_ID": 4, - "PSEUDONYMOUS_ID": 5 - } - } - } - }, - "ContactIdInfo": { - "oneofs": { - "_dataSourceType": { - "oneof": [ - "dataSourceType" - ] - } - }, - "fields": { - "dataSourceType": { - "type": "DataSourceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "matchRatePercentage": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "MobileIdInfo": { - "oneofs": { - "_dataSourceType": { - "oneof": [ - "dataSourceType" - ] - }, - "_keySpace": { - "oneof": [ - "keySpace" - ] - }, - "_appId": { - "oneof": [ - "appId" - ] - } - }, - "fields": { - "dataSourceType": { - "type": "DataSourceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "keySpace": { - "type": "KeySpace", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "appId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - } - }, - "nested": { - "KeySpace": { - "values": { - "KEY_SPACE_UNSPECIFIED": 0, - "IOS": 1, - "ANDROID": 2 - } - } - } - }, - "UserIdInfo": { - "oneofs": { - "_dataSourceType": { - "oneof": [ - "dataSourceType" - ] - } - }, - "fields": { - "dataSourceType": { - "type": "DataSourceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - } - } - }, - "PairIdInfo": { - "oneofs": { - "_publisherId": { - "oneof": [ - "publisherId" - ] - }, - "_publisherName": { - "oneof": [ - "publisherName" - ] - }, - "_cleanRoomIdentifier": { - "oneof": [ - "cleanRoomIdentifier" - ] - } - }, - "fields": { - "publisherId": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "publisherName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "matchRatePercentage": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "advertiserIdentifierCount": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cleanRoomIdentifier": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - } - } - }, - "PartnerAudienceInfo": { - "oneofs": { - "_partnerAudienceSource": { - "oneof": [ - "partnerAudienceSource" - ] - }, - "_commercePartner": { - "oneof": [ - "commercePartner" - ] - } - }, - "fields": { - "partnerAudienceSource": { - "type": "PartnerAudienceSource", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "commercePartner": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "PartnerAudienceSource": { - "values": { - "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": 0, - "COMMERCE_AUDIENCE": 1, - "LINEAR_TV_AUDIENCE": 2, - "AGENCY_PROVIDER_AUDIENCE": 3 - } - } - } - }, - "PseudonymousIdInfo": { - "oneofs": { - "_syncStatus": { - "oneof": [ - "syncStatus" - ] - }, - "_billableRecordCount": { - "oneof": [ - "billableRecordCount" - ] - } - }, - "fields": { - "syncStatus": { - "type": "SyncStatus", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "billableRecordCount": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - } - }, - "nested": { - "SyncStatus": { - "values": { - "SYNC_STATUS_UNSPECIFIED": 0, - "CREATED": 1, - "READY_FOR_USE": 2, - "FAILED": 3 - } - } - } - }, - "DataSourceType": { - "values": { - "DATA_SOURCE_TYPE_UNSPECIFIED": 0, - "DATA_SOURCE_TYPE_FIRST_PARTY": 1, - "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": 2, - "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": 3, - "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": 4 - } - }, - "UserListDirectLicense": { - "options": { - "(google.api.resource).type": "datamanager.googleapis.com/UserListDirectLicense", - "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}", - "(google.api.resource).plural": "userListDirectLicenses", - "(google.api.resource).singular": "userListDirectLicense" - }, - "oneofs": { - "_userListId": { - "oneof": [ - "userListId" - ] - }, - "_clientAccountType": { - "oneof": [ - "clientAccountType" - ] - }, - "_clientAccountId": { - "oneof": [ - "clientAccountId" - ] - }, - "_status": { - "oneof": [ - "status" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "userListId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "userListDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientAccountType": { - "type": "UserListLicenseClientAccountType", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "clientAccountId": { - "type": "int64", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "clientAccountDisplayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "UserListLicenseStatus", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "pricing": { - "type": "UserListLicensePricing", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "historicalPricings": { - "rule": "repeated", - "type": "UserListLicensePricing", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metrics": { - "type": "UserListLicenseMetrics", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "UserListLicenseClientAccountType": { - "values": { - "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": 0, - "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": 1, - "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": 2, - "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": 3, - "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": 4 - } - }, - "UserListLicenseMetrics": { - "fields": { - "clickCount": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "impressionCount": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "revenueUsdMicros": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startDate": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endDate": { - "type": "int64", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "UserListLicensePricing": { - "oneofs": { - "_costMicros": { - "oneof": [ - "costMicros" - ] - }, - "_currencyCode": { - "oneof": [ - "currencyCode" - ] - }, - "_costType": { - "oneof": [ - "costType" - ] - }, - "_maxCostMicros": { - "oneof": [ - "maxCostMicros" - ] - } - }, - "fields": { - "pricingId": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "costMicros": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "currencyCode": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pricingActive": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "buyerApprovalState": { - "type": "UserListPricingBuyerApprovalState", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "costType": { - "type": "UserListPricingCostType", - "id": 7, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "maxCostMicros": { - "type": "int64", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "UserListPricingBuyerApprovalState": { - "values": { - "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": 0, - "PENDING": 1, - "APPROVED": 2, - "REJECTED": 3 - } - }, - "UserListPricingCostType": { - "values": { - "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": 0, - "CPC": 1, - "CPM": 2, - "MEDIA_SHARE": 3 - } - } - } - }, - "UserListLicenseStatus": { - "values": { - "USER_LIST_LICENSE_STATUS_UNSPECIFIED": 0, - "USER_LIST_LICENSE_STATUS_ENABLED": 1, - "USER_LIST_LICENSE_STATUS_DISABLED": 2 - } - }, - "UserListDirectLicenseService": { - "options": { - "(google.api.default_host)": "datamanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" - }, - "methods": { - "CreateUserListDirectLicense": { - "requestType": "CreateUserListDirectLicenseRequest", - "responseType": "UserListDirectLicense", - "options": { - "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", - "(google.api.http).body": "user_list_direct_license", - "(google.api.method_signature)": "parent,user_list_direct_license" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", - "body": "user_list_direct_license" - } - }, - { - "(google.api.method_signature)": "parent,user_list_direct_license" - } - ] - }, - "GetUserListDirectLicense": { - "requestType": "GetUserListDirectLicenseRequest", - "responseType": "UserListDirectLicense", - "options": { - "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateUserListDirectLicense": { - "requestType": "UpdateUserListDirectLicenseRequest", - "responseType": "UserListDirectLicense", - "options": { - "(google.api.http).patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", - "(google.api.http).body": "user_list_direct_license", - "(google.api.method_signature)": "user_list_direct_license,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", - "body": "user_list_direct_license" - } - }, - { - "(google.api.method_signature)": "user_list_direct_license,update_mask" - } - ] - }, - "ListUserListDirectLicenses": { - "requestType": "ListUserListDirectLicensesRequest", - "responseType": "ListUserListDirectLicensesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateUserListDirectLicenseRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" - } - }, - "userListDirectLicense": { - "type": "UserListDirectLicense", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetUserListDirectLicenseRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListDirectLicense" - } - } - } - }, - "UpdateUserListDirectLicenseRequest": { - "fields": { - "userListDirectLicense": { - "type": "UserListDirectLicense", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserListDirectLicensesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserListDirectLicensesResponse": { - "fields": { - "userListDirectLicenses": { - "rule": "repeated", - "type": "UserListDirectLicense", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UserListGlobalLicense": { - "options": { - "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicense", - "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}", - "(google.api.resource).plural": "userListGlobalLicenses", - "(google.api.resource).singular": "userListGlobalLicense" - }, - "oneofs": { - "_userListId": { - "oneof": [ - "userListId" - ] - }, - "_licenseType": { - "oneof": [ - "licenseType" - ] - }, - "_status": { - "oneof": [ - "status" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "userListId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "userListDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "licenseType": { - "type": "UserListGlobalLicenseType", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "proto3_optional": true - } - }, - "status": { - "type": "UserListLicenseStatus", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "pricing": { - "type": "UserListLicensePricing", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "historicalPricings": { - "rule": "repeated", - "type": "UserListLicensePricing", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metrics": { - "type": "UserListLicenseMetrics", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "UserListGlobalLicenseCustomerInfo": { - "options": { - "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo", - "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}", - "(google.api.resource).plural": "userListGlobalLicenseCustomerInfos", - "(google.api.resource).singular": "userListGlobalLicenseCustomerInfo" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "userListId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "userListDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "licenseType": { - "type": "UserListGlobalLicenseType", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "UserListLicenseStatus", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "pricing": { - "type": "UserListLicensePricing", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientAccountType": { - "type": "UserListLicenseClientAccountType", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientAccountId": { - "type": "int64", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clientAccountDisplayName": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "historicalPricings": { - "rule": "repeated", - "type": "UserListLicensePricing", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metrics": { - "type": "UserListLicenseMetrics", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "UserListGlobalLicenseType": { - "values": { - "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": 0, - "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": 1, - "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": 2, - "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": 3 - } - }, - "UserListGlobalLicenseService": { - "options": { - "(google.api.default_host)": "datamanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" - }, - "methods": { - "CreateUserListGlobalLicense": { - "requestType": "CreateUserListGlobalLicenseRequest", - "responseType": "UserListGlobalLicense", - "options": { - "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", - "(google.api.http).body": "user_list_global_license", - "(google.api.method_signature)": "parent,user_list_global_license" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", - "body": "user_list_global_license" - } - }, - { - "(google.api.method_signature)": "parent,user_list_global_license" - } - ] - }, - "UpdateUserListGlobalLicense": { - "requestType": "UpdateUserListGlobalLicenseRequest", - "responseType": "UserListGlobalLicense", - "options": { - "(google.api.http).patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", - "(google.api.http).body": "user_list_global_license", - "(google.api.method_signature)": "user_list_global_license,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", - "body": "user_list_global_license" - } - }, - { - "(google.api.method_signature)": "user_list_global_license,update_mask" - } - ] - }, - "GetUserListGlobalLicense": { - "requestType": "GetUserListGlobalLicenseRequest", - "responseType": "UserListGlobalLicense", - "options": { - "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserListGlobalLicenses": { - "requestType": "ListUserListGlobalLicensesRequest", - "responseType": "ListUserListGlobalLicensesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ListUserListGlobalLicenseCustomerInfos": { - "requestType": "ListUserListGlobalLicenseCustomerInfosRequest", - "responseType": "ListUserListGlobalLicenseCustomerInfosResponse", - "options": { - "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateUserListGlobalLicenseRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" - } - }, - "userListGlobalLicense": { - "type": "UserListGlobalLicense", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateUserListGlobalLicenseRequest": { - "fields": { - "userListGlobalLicense": { - "type": "UserListGlobalLicense", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetUserListGlobalLicenseRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListGlobalLicense" - } - } - } - }, - "ListUserListGlobalLicensesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserListGlobalLicensesResponse": { - "fields": { - "userListGlobalLicenses": { - "rule": "repeated", - "type": "UserListGlobalLicense", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListUserListGlobalLicenseCustomerInfosRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo" - } - }, - "filter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserListGlobalLicenseCustomerInfosResponse": { - "fields": { - "userListGlobalLicenseCustomerInfos": { - "rule": "repeated", - "type": "UserListGlobalLicenseCustomerInfo", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UserListService": { - "options": { - "(google.api.default_host)": "datamanager.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" - }, - "methods": { - "GetUserList": { - "requestType": "GetUserListRequest", - "responseType": "UserList", - "options": { - "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserLists": { - "requestType": "ListUserListsRequest", - "responseType": "ListUserListsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userLists", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=accountTypes/*/accounts/*}/userLists" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateUserList": { - "requestType": "CreateUserListRequest", - "responseType": "UserList", - "options": { - "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", - "(google.api.http).body": "user_list", - "(google.api.method_signature)": "parent,user_list" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", - "body": "user_list" - } - }, - { - "(google.api.method_signature)": "parent,user_list" - } - ] - }, - "UpdateUserList": { - "requestType": "UpdateUserListRequest", - "responseType": "UserList", - "options": { - "(google.api.http).patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", - "(google.api.http).body": "user_list", - "(google.api.method_signature)": "user_list,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", - "body": "user_list" - } - }, - { - "(google.api.method_signature)": "user_list,update_mask" - } - ] - }, - "DeleteUserList": { - "requestType": "DeleteUserListRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "GetUserListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" - } - } - } - }, - "ListUserListsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" - } - }, - "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" - } - } - } - }, - "ListUserListsResponse": { - "fields": { - "userLists": { - "rule": "repeated", - "type": "UserList", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateUserListRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" - } - }, - "userList": { - "type": "UserList", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateUserListRequest": { - "fields": { - "userList": { - "type": "UserList", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteUserListRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" - } - }, - "validateOnly": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - } - } - }, - "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 - } - }, - "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 - } - } - }, - "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 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js deleted file mode 100644 index 8ba5e2618ea..00000000000 --- a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_audience_members.js +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js deleted file mode 100644 index ee3433aa233..00000000000 --- a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.ingest_events.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js deleted file mode 100644 index c658a3a353b..00000000000 --- a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.remove_audience_members.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js deleted file mode 100644 index 2eb4495b57e..00000000000 --- a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/ingestion_service.retrieve_request_status.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json b/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json deleted file mode 100644 index 08c06e3ea9f..00000000000 --- a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/snippet_metadata_google.ads.datamanager.v1.json +++ /dev/null @@ -1,1063 +0,0 @@ -{ - "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" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_async", - "title": "IngestionService retrieveInsights Sample", - "origin": "API_DEFINITION", - "description": " Retrieves marketing data insights for a given user list. This feature is only available to data partners. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "marketing_data_insights_service.retrieve_insights.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RetrieveInsights", - "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "baseline", - "type": ".google.ads.datamanager.v1.Baseline" - }, - { - "name": "user_list_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.RetrieveInsightsResponse", - "client": { - "shortName": "MarketingDataInsightsServiceClient", - "fullName": "google.ads.datamanager.v1.MarketingDataInsightsServiceClient" - }, - "method": { - "shortName": "RetrieveInsights", - "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", - "service": { - "shortName": "MarketingDataInsightsService", - "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_async", - "title": "IngestionService createPartnerLink Sample", - "origin": "API_DEFINITION", - "description": " Creates a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "partner_link_service.create_partner_link.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePartnerLink", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "partner_link", - "type": ".google.ads.datamanager.v1.PartnerLink" - } - ], - "resultType": ".google.ads.datamanager.v1.PartnerLink", - "client": { - "shortName": "PartnerLinkServiceClient", - "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" - }, - "method": { - "shortName": "CreatePartnerLink", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", - "service": { - "shortName": "PartnerLinkService", - "fullName": "google.ads.datamanager.v1.PartnerLinkService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_async", - "title": "IngestionService deletePartnerLink Sample", - "origin": "API_DEFINITION", - "description": " Deletes a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "partner_link_service.delete_partner_link.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePartnerLink", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PartnerLinkServiceClient", - "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" - }, - "method": { - "shortName": "DeletePartnerLink", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", - "service": { - "shortName": "PartnerLinkService", - "fullName": "google.ads.datamanager.v1.PartnerLinkService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_async", - "title": "IngestionService searchPartnerLinks Sample", - "origin": "API_DEFINITION", - "description": " Searches for all partner links to and from a given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "partner_link_service.search_partner_links.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchPartnerLinks", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", - "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" - } - ], - "resultType": ".google.ads.datamanager.v1.SearchPartnerLinksResponse", - "client": { - "shortName": "PartnerLinkServiceClient", - "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" - }, - "method": { - "shortName": "SearchPartnerLinks", - "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", - "service": { - "shortName": "PartnerLinkService", - "fullName": "google.ads.datamanager.v1.PartnerLinkService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_async", - "title": "IngestionService createUserListDirectLicense Sample", - "origin": "API_DEFINITION", - "description": " Creates a user list direct license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_direct_license_service.create_user_list_direct_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_list_direct_license", - "type": ".google.ads.datamanager.v1.UserListDirectLicense" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", - "client": { - "shortName": "UserListDirectLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" - }, - "method": { - "shortName": "CreateUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", - "service": { - "shortName": "UserListDirectLicenseService", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_async", - "title": "IngestionService getUserListDirectLicense Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a user list direct license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_direct_license_service.get_user_list_direct_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", - "client": { - "shortName": "UserListDirectLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" - }, - "method": { - "shortName": "GetUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", - "service": { - "shortName": "UserListDirectLicenseService", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_async", - "title": "IngestionService updateUserListDirectLicense Sample", - "origin": "API_DEFINITION", - "description": " Updates a user list direct license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_direct_license_service.update_user_list_direct_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", - "async": true, - "parameters": [ - { - "name": "user_list_direct_license", - "type": ".google.ads.datamanager.v1.UserListDirectLicense" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", - "client": { - "shortName": "UserListDirectLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" - }, - "method": { - "shortName": "UpdateUserListDirectLicense", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", - "service": { - "shortName": "UserListDirectLicenseService", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_async", - "title": "IngestionService listUserListDirectLicenses Sample", - "origin": "API_DEFINITION", - "description": " Lists all user list direct licenses owned by the parent account. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_direct_license_service.list_user_list_direct_licenses.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserListDirectLicenses", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.ListUserListDirectLicensesResponse", - "client": { - "shortName": "UserListDirectLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" - }, - "method": { - "shortName": "ListUserListDirectLicenses", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", - "service": { - "shortName": "UserListDirectLicenseService", - "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_async", - "title": "IngestionService createUserListGlobalLicense Sample", - "origin": "API_DEFINITION", - "description": " Creates a user list global license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_global_license_service.create_user_list_global_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_list_global_license", - "type": ".google.ads.datamanager.v1.UserListGlobalLicense" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", - "client": { - "shortName": "UserListGlobalLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" - }, - "method": { - "shortName": "CreateUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", - "service": { - "shortName": "UserListGlobalLicenseService", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_async", - "title": "IngestionService updateUserListGlobalLicense Sample", - "origin": "API_DEFINITION", - "description": " Updates a user list global license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_global_license_service.update_user_list_global_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", - "async": true, - "parameters": [ - { - "name": "user_list_global_license", - "type": ".google.ads.datamanager.v1.UserListGlobalLicense" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", - "client": { - "shortName": "UserListGlobalLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" - }, - "method": { - "shortName": "UpdateUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", - "service": { - "shortName": "UserListGlobalLicenseService", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_async", - "title": "IngestionService getUserListGlobalLicense Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a user list global license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_global_license_service.get_user_list_global_license.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", - "client": { - "shortName": "UserListGlobalLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" - }, - "method": { - "shortName": "GetUserListGlobalLicense", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", - "service": { - "shortName": "UserListGlobalLicenseService", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_async", - "title": "IngestionService listUserListGlobalLicenses Sample", - "origin": "API_DEFINITION", - "description": " Lists all user list global licenses owned by the parent account. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_global_license_service.list_user_list_global_licenses.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserListGlobalLicenses", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse", - "client": { - "shortName": "UserListGlobalLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" - }, - "method": { - "shortName": "ListUserListGlobalLicenses", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", - "service": { - "shortName": "UserListGlobalLicenseService", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_async", - "title": "IngestionService listUserListGlobalLicenseCustomerInfos Sample", - "origin": "API_DEFINITION", - "description": " Lists all customer info for a user list global license. This feature is only available to data partners.", - "canonical": true, - "file": "user_list_global_license_service.list_user_list_global_license_customer_infos.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 94, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserListGlobalLicenseCustomerInfos", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse", - "client": { - "shortName": "UserListGlobalLicenseServiceClient", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" - }, - "method": { - "shortName": "ListUserListGlobalLicenseCustomerInfos", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", - "service": { - "shortName": "UserListGlobalLicenseService", - "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListService_GetUserList_async", - "title": "IngestionService getUserList Sample", - "origin": "API_DEFINITION", - "description": " Gets a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "user_list_service.get_user_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserList", - "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.ads.datamanager.v1.UserList", - "client": { - "shortName": "UserListServiceClient", - "fullName": "google.ads.datamanager.v1.UserListServiceClient" - }, - "method": { - "shortName": "GetUserList", - "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", - "service": { - "shortName": "UserListService", - "fullName": "google.ads.datamanager.v1.UserListService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListService_ListUserLists_async", - "title": "IngestionService listUserLists Sample", - "origin": "API_DEFINITION", - "description": " Lists UserLists. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "user_list_service.list_user_lists.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserLists", - "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", - "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" - } - ], - "resultType": ".google.ads.datamanager.v1.ListUserListsResponse", - "client": { - "shortName": "UserListServiceClient", - "fullName": "google.ads.datamanager.v1.UserListServiceClient" - }, - "method": { - "shortName": "ListUserLists", - "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", - "service": { - "shortName": "UserListService", - "fullName": "google.ads.datamanager.v1.UserListService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListService_CreateUserList_async", - "title": "IngestionService createUserList Sample", - "origin": "API_DEFINITION", - "description": " Creates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "user_list_service.create_user_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserList", - "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_list", - "type": ".google.ads.datamanager.v1.UserList" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.ads.datamanager.v1.UserList", - "client": { - "shortName": "UserListServiceClient", - "fullName": "google.ads.datamanager.v1.UserListServiceClient" - }, - "method": { - "shortName": "CreateUserList", - "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", - "service": { - "shortName": "UserListService", - "fullName": "google.ads.datamanager.v1.UserListService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListService_UpdateUserList_async", - "title": "IngestionService updateUserList Sample", - "origin": "API_DEFINITION", - "description": " Updates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "user_list_service.update_user_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserList", - "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", - "async": true, - "parameters": [ - { - "name": "user_list", - "type": ".google.ads.datamanager.v1.UserList" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.ads.datamanager.v1.UserList", - "client": { - "shortName": "UserListServiceClient", - "fullName": "google.ads.datamanager.v1.UserListServiceClient" - }, - "method": { - "shortName": "UpdateUserList", - "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", - "service": { - "shortName": "UserListService", - "fullName": "google.ads.datamanager.v1.UserListService" - } - } - } - }, - { - "regionTag": "datamanager_v1_generated_UserListService_DeleteUserList_async", - "title": "IngestionService deleteUserList Sample", - "origin": "API_DEFINITION", - "description": " Deletes a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", - "canonical": true, - "file": "user_list_service.delete_user_list.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteUserList", - "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "UserListServiceClient", - "fullName": "google.ads.datamanager.v1.UserListServiceClient" - }, - "method": { - "shortName": "DeleteUserList", - "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", - "service": { - "shortName": "UserListService", - "fullName": "google.ads.datamanager.v1.UserListService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-ads-datamanager/src/index.ts b/owl-bot-staging/google-ads-datamanager/src/index.ts deleted file mode 100644 index f2dc3b71128..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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; -const MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; -type MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; -const PartnerLinkServiceClient = v1.PartnerLinkServiceClient; -type PartnerLinkServiceClient = v1.PartnerLinkServiceClient; -const UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; -type UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; -const UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; -type UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; -const UserListServiceClient = v1.UserListServiceClient; -type UserListServiceClient = v1.UserListServiceClient; - -export {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; -export default {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json b/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json deleted file mode 100644 index 97528f86755..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/v1/gapic_metadata.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "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" - ] - } - } - } - } - }, - "MarketingDataInsightsService": { - "clients": { - "grpc": { - "libraryClient": "MarketingDataInsightsServiceClient", - "rpcs": { - "RetrieveInsights": { - "methods": [ - "retrieveInsights" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "MarketingDataInsightsServiceClient", - "rpcs": { - "RetrieveInsights": { - "methods": [ - "retrieveInsights" - ] - } - } - } - } - }, - "PartnerLinkService": { - "clients": { - "grpc": { - "libraryClient": "PartnerLinkServiceClient", - "rpcs": { - "CreatePartnerLink": { - "methods": [ - "createPartnerLink" - ] - }, - "DeletePartnerLink": { - "methods": [ - "deletePartnerLink" - ] - }, - "SearchPartnerLinks": { - "methods": [ - "searchPartnerLinks", - "searchPartnerLinksStream", - "searchPartnerLinksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PartnerLinkServiceClient", - "rpcs": { - "CreatePartnerLink": { - "methods": [ - "createPartnerLink" - ] - }, - "DeletePartnerLink": { - "methods": [ - "deletePartnerLink" - ] - }, - "SearchPartnerLinks": { - "methods": [ - "searchPartnerLinks", - "searchPartnerLinksStream", - "searchPartnerLinksAsync" - ] - } - } - } - } - }, - "UserListDirectLicenseService": { - "clients": { - "grpc": { - "libraryClient": "UserListDirectLicenseServiceClient", - "rpcs": { - "CreateUserListDirectLicense": { - "methods": [ - "createUserListDirectLicense" - ] - }, - "GetUserListDirectLicense": { - "methods": [ - "getUserListDirectLicense" - ] - }, - "UpdateUserListDirectLicense": { - "methods": [ - "updateUserListDirectLicense" - ] - }, - "ListUserListDirectLicenses": { - "methods": [ - "listUserListDirectLicenses", - "listUserListDirectLicensesStream", - "listUserListDirectLicensesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "UserListDirectLicenseServiceClient", - "rpcs": { - "CreateUserListDirectLicense": { - "methods": [ - "createUserListDirectLicense" - ] - }, - "GetUserListDirectLicense": { - "methods": [ - "getUserListDirectLicense" - ] - }, - "UpdateUserListDirectLicense": { - "methods": [ - "updateUserListDirectLicense" - ] - }, - "ListUserListDirectLicenses": { - "methods": [ - "listUserListDirectLicenses", - "listUserListDirectLicensesStream", - "listUserListDirectLicensesAsync" - ] - } - } - } - } - }, - "UserListGlobalLicenseService": { - "clients": { - "grpc": { - "libraryClient": "UserListGlobalLicenseServiceClient", - "rpcs": { - "CreateUserListGlobalLicense": { - "methods": [ - "createUserListGlobalLicense" - ] - }, - "UpdateUserListGlobalLicense": { - "methods": [ - "updateUserListGlobalLicense" - ] - }, - "GetUserListGlobalLicense": { - "methods": [ - "getUserListGlobalLicense" - ] - }, - "ListUserListGlobalLicenses": { - "methods": [ - "listUserListGlobalLicenses", - "listUserListGlobalLicensesStream", - "listUserListGlobalLicensesAsync" - ] - }, - "ListUserListGlobalLicenseCustomerInfos": { - "methods": [ - "listUserListGlobalLicenseCustomerInfos", - "listUserListGlobalLicenseCustomerInfosStream", - "listUserListGlobalLicenseCustomerInfosAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "UserListGlobalLicenseServiceClient", - "rpcs": { - "CreateUserListGlobalLicense": { - "methods": [ - "createUserListGlobalLicense" - ] - }, - "UpdateUserListGlobalLicense": { - "methods": [ - "updateUserListGlobalLicense" - ] - }, - "GetUserListGlobalLicense": { - "methods": [ - "getUserListGlobalLicense" - ] - }, - "ListUserListGlobalLicenses": { - "methods": [ - "listUserListGlobalLicenses", - "listUserListGlobalLicensesStream", - "listUserListGlobalLicensesAsync" - ] - }, - "ListUserListGlobalLicenseCustomerInfos": { - "methods": [ - "listUserListGlobalLicenseCustomerInfos", - "listUserListGlobalLicenseCustomerInfosStream", - "listUserListGlobalLicenseCustomerInfosAsync" - ] - } - } - } - } - }, - "UserListService": { - "clients": { - "grpc": { - "libraryClient": "UserListServiceClient", - "rpcs": { - "GetUserList": { - "methods": [ - "getUserList" - ] - }, - "CreateUserList": { - "methods": [ - "createUserList" - ] - }, - "UpdateUserList": { - "methods": [ - "updateUserList" - ] - }, - "DeleteUserList": { - "methods": [ - "deleteUserList" - ] - }, - "ListUserLists": { - "methods": [ - "listUserLists", - "listUserListsStream", - "listUserListsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "UserListServiceClient", - "rpcs": { - "GetUserList": { - "methods": [ - "getUserList" - ] - }, - "CreateUserList": { - "methods": [ - "createUserList" - ] - }, - "UpdateUserList": { - "methods": [ - "updateUserList" - ] - }, - "DeleteUserList": { - "methods": [ - "deleteUserList" - ] - }, - "ListUserLists": { - "methods": [ - "listUserLists", - "listUserListsStream", - "listUserListsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/index.ts b/owl-bot-staging/google-ads-datamanager/src/v1/index.ts deleted file mode 100644 index b7d57ada5bc..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/v1/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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'; -export {MarketingDataInsightsServiceClient} from './marketing_data_insights_service_client'; -export {PartnerLinkServiceClient} from './partner_link_service_client'; -export {UserListDirectLicenseServiceClient} from './user_list_direct_license_service_client'; -export {UserListGlobalLicenseServiceClient} from './user_list_global_license_service_client'; -export {UserListServiceClient} from './user_list_service_client'; diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts deleted file mode 100644 index 30ad66231cf..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client.ts +++ /dev/null @@ -1,1048 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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}; - pathTemplates: {[name: string]: gax.PathTemplate}; - 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); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - partnerLinkPathTemplate: new this._gaxModule.PathTemplate( - 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' - ), - userListPathTemplate: new this._gaxModule.PathTemplate( - 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' - ), - userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( - 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' - ), - userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( - 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' - ), - userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( - 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' - ), - }; - - // 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; - }); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified partnerLink resource name string. - * - * @param {string} account_type - * @param {string} account - * @param {string} partner_link - * @returns {string} Resource name string. - */ - partnerLinkPath(accountType:string,account:string,partnerLink:string) { - return this.pathTemplates.partnerLinkPathTemplate.render({ - account_type: accountType, - account: account, - partner_link: partnerLink, - }); - } - - /** - * Parse the account_type from PartnerLink resource. - * - * @param {string} partnerLinkName - * A fully-qualified path representing PartnerLink resource. - * @returns {string} A string representing the account_type. - */ - matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { - return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; - } - - /** - * Parse the account from PartnerLink resource. - * - * @param {string} partnerLinkName - * A fully-qualified path representing PartnerLink resource. - * @returns {string} A string representing the account. - */ - matchAccountFromPartnerLinkName(partnerLinkName: string) { - return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; - } - - /** - * Parse the partner_link from PartnerLink resource. - * - * @param {string} partnerLinkName - * A fully-qualified path representing PartnerLink resource. - * @returns {string} A string representing the partner_link. - */ - matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { - return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; - } - - /** - * Return a fully-qualified userList resource name string. - * - * @param {string} account_type - * @param {string} account - * @param {string} user_list - * @returns {string} Resource name string. - */ - userListPath(accountType:string,account:string,userList:string) { - return this.pathTemplates.userListPathTemplate.render({ - account_type: accountType, - account: account, - user_list: userList, - }); - } - - /** - * Parse the account_type from UserList resource. - * - * @param {string} userListName - * A fully-qualified path representing UserList resource. - * @returns {string} A string representing the account_type. - */ - matchAccountTypeFromUserListName(userListName: string) { - return this.pathTemplates.userListPathTemplate.match(userListName).account_type; - } - - /** - * Parse the account from UserList resource. - * - * @param {string} userListName - * A fully-qualified path representing UserList resource. - * @returns {string} A string representing the account. - */ - matchAccountFromUserListName(userListName: string) { - return this.pathTemplates.userListPathTemplate.match(userListName).account; - } - - /** - * Parse the user_list from UserList resource. - * - * @param {string} userListName - * A fully-qualified path representing UserList resource. - * @returns {string} A string representing the user_list. - */ - matchUserListFromUserListName(userListName: string) { - return this.pathTemplates.userListPathTemplate.match(userListName).user_list; - } - - /** - * Return a fully-qualified userListDirectLicense resource name string. - * - * @param {string} account_type - * @param {string} account - * @param {string} user_list_direct_license - * @returns {string} Resource name string. - */ - userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { - return this.pathTemplates.userListDirectLicensePathTemplate.render({ - account_type: accountType, - account: account, - user_list_direct_license: userListDirectLicense, - }); - } - - /** - * Parse the account_type from UserListDirectLicense resource. - * - * @param {string} userListDirectLicenseName - * A fully-qualified path representing UserListDirectLicense resource. - * @returns {string} A string representing the account_type. - */ - matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { - return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; - } - - /** - * Parse the account from UserListDirectLicense resource. - * - * @param {string} userListDirectLicenseName - * A fully-qualified path representing UserListDirectLicense resource. - * @returns {string} A string representing the account. - */ - matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { - return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; - } - - /** - * Parse the user_list_direct_license from UserListDirectLicense resource. - * - * @param {string} userListDirectLicenseName - * A fully-qualified path representing UserListDirectLicense resource. - * @returns {string} A string representing the user_list_direct_license. - */ - matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { - return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; - } - - /** - * Return a fully-qualified userListGlobalLicense resource name string. - * - * @param {string} account_type - * @param {string} account - * @param {string} user_list_global_license - * @returns {string} Resource name string. - */ - userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { - return this.pathTemplates.userListGlobalLicensePathTemplate.render({ - account_type: accountType, - account: account, - user_list_global_license: userListGlobalLicense, - }); - } - - /** - * Parse the account_type from UserListGlobalLicense resource. - * - * @param {string} userListGlobalLicenseName - * A fully-qualified path representing UserListGlobalLicense resource. - * @returns {string} A string representing the account_type. - */ - matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { - return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; - } - - /** - * Parse the account from UserListGlobalLicense resource. - * - * @param {string} userListGlobalLicenseName - * A fully-qualified path representing UserListGlobalLicense resource. - * @returns {string} A string representing the account. - */ - matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { - return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; - } - - /** - * Parse the user_list_global_license from UserListGlobalLicense resource. - * - * @param {string} userListGlobalLicenseName - * A fully-qualified path representing UserListGlobalLicense resource. - * @returns {string} A string representing the user_list_global_license. - */ - matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { - return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; - } - - /** - * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. - * - * @param {string} account_type - * @param {string} account - * @param {string} user_list_global_license - * @param {string} license_customer_info - * @returns {string} Resource name string. - */ - userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { - return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ - account_type: accountType, - account: account, - user_list_global_license: userListGlobalLicense, - license_customer_info: licenseCustomerInfo, - }); - } - - /** - * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. - * - * @param {string} userListGlobalLicenseCustomerInfoName - * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. - * @returns {string} A string representing the account_type. - */ - matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { - return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; - } - - /** - * Parse the account from UserListGlobalLicenseCustomerInfo resource. - * - * @param {string} userListGlobalLicenseCustomerInfoName - * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. - * @returns {string} A string representing the account. - */ - matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { - return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; - } - - /** - * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. - * - * @param {string} userListGlobalLicenseCustomerInfoName - * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. - * @returns {string} A string representing the user_list_global_license. - */ - matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { - return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; - } - - /** - * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. - * - * @param {string} userListGlobalLicenseCustomerInfoName - * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. - * @returns {string} A string representing the license_customer_info. - */ - matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { - return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; - } - - /** - * 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/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json deleted file mode 100644 index d198e4f1285..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_client_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "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/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json b/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json deleted file mode 100644 index ec5cc61b87e..00000000000 --- a/owl-bot-staging/google-ads-datamanager/src/v1/ingestion_service_proto_list.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - "../../protos/google/ads/datamanager/v1/age_range.proto", - "../../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/gender.proto", - "../../protos/google/ads/datamanager/v1/ingestion_service.proto", - "../../protos/google/ads/datamanager/v1/insights_service.proto", - "../../protos/google/ads/datamanager/v1/item_parameter.proto", - "../../protos/google/ads/datamanager/v1/match_rate.proto", - "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", - "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", - "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", - "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", - "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", - "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", - "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", - "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", - "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", - "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", - "../../protos/google/ads/datamanager/v1/user_list_service.proto", - "../../protos/google/ads/datamanager/v1/user_properties.proto" -] diff --git a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js deleted file mode 100644 index da1c9a355b4..00000000000 --- a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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(); - const marketingDataInsightsServiceClient = new datamanager.MarketingDataInsightsServiceClient(); - const partnerLinkServiceClient = new datamanager.PartnerLinkServiceClient(); - const userListDirectLicenseServiceClient = new datamanager.UserListDirectLicenseServiceClient(); - const userListGlobalLicenseServiceClient = new datamanager.UserListGlobalLicenseServiceClient(); - const userListServiceClient = new datamanager.UserListServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 2e2810220ae..00000000000 --- a/owl-bot-staging/google-ads-datamanager/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient} from '@google-ads/datamanager'; - -// check that the client class type name can be used -function doStuffWithIngestionServiceClient(client: IngestionServiceClient) { - client.close(); -} -function doStuffWithMarketingDataInsightsServiceClient(client: MarketingDataInsightsServiceClient) { - client.close(); -} -function doStuffWithPartnerLinkServiceClient(client: PartnerLinkServiceClient) { - client.close(); -} -function doStuffWithUserListDirectLicenseServiceClient(client: UserListDirectLicenseServiceClient) { - client.close(); -} -function doStuffWithUserListGlobalLicenseServiceClient(client: UserListGlobalLicenseServiceClient) { - client.close(); -} -function doStuffWithUserListServiceClient(client: UserListServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const ingestionServiceClient = new IngestionServiceClient(); - doStuffWithIngestionServiceClient(ingestionServiceClient); - // check that the client instance can be created - const marketingDataInsightsServiceClient = new MarketingDataInsightsServiceClient(); - doStuffWithMarketingDataInsightsServiceClient(marketingDataInsightsServiceClient); - // check that the client instance can be created - const partnerLinkServiceClient = new PartnerLinkServiceClient(); - doStuffWithPartnerLinkServiceClient(partnerLinkServiceClient); - // check that the client instance can be created - const userListDirectLicenseServiceClient = new UserListDirectLicenseServiceClient(); - doStuffWithUserListDirectLicenseServiceClient(userListDirectLicenseServiceClient); - // check that the client instance can be created - const userListGlobalLicenseServiceClient = new UserListGlobalLicenseServiceClient(); - doStuffWithUserListGlobalLicenseServiceClient(userListGlobalLicenseServiceClient); - // check that the client instance can be created - const userListServiceClient = new UserListServiceClient(); - doStuffWithUserListServiceClient(userListServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-ads-datamanager/system-test/install.ts b/owl-bot-staging/google-ads-datamanager/system-test/install.ts deleted file mode 100644 index 394f3362d20..00000000000 --- a/owl-bot-staging/google-ads-datamanager/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts b/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts deleted file mode 100644 index ab31bea65b7..00000000000 --- a/owl-bot-staging/google-ads-datamanager/test/gapic_ingestion_service_v1.ts +++ /dev/null @@ -1,755 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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); - }); - }); - - describe('Path templates', () => { - - describe('partnerLink', async () => { - const fakePath = "/rendered/path/partnerLink"; - const expectedParameters = { - account_type: "accountTypeValue", - account: "accountValue", - partner_link: "partnerLinkValue", - }; - const client = new ingestionserviceModule.v1.IngestionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.partnerLinkPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partnerLinkPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partnerLinkPath', () => { - const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchAccountTypeFromPartnerLinkName', () => { - const result = client.matchAccountTypeFromPartnerLinkName(fakePath); - assert.strictEqual(result, "accountTypeValue"); - assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAccountFromPartnerLinkName', () => { - const result = client.matchAccountFromPartnerLinkName(fakePath); - assert.strictEqual(result, "accountValue"); - assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartnerLinkFromPartnerLinkName', () => { - const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); - assert.strictEqual(result, "partnerLinkValue"); - assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userList', async () => { - const fakePath = "/rendered/path/userList"; - const expectedParameters = { - account_type: "accountTypeValue", - account: "accountValue", - user_list: "userListValue", - }; - const client = new ingestionserviceModule.v1.IngestionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.userListPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userListPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userListPath', () => { - const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userListPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchAccountTypeFromUserListName', () => { - const result = client.matchAccountTypeFromUserListName(fakePath); - assert.strictEqual(result, "accountTypeValue"); - assert((client.pathTemplates.userListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAccountFromUserListName', () => { - const result = client.matchAccountFromUserListName(fakePath); - assert.strictEqual(result, "accountValue"); - assert((client.pathTemplates.userListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserListFromUserListName', () => { - const result = client.matchUserListFromUserListName(fakePath); - assert.strictEqual(result, "userListValue"); - assert((client.pathTemplates.userListPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userListDirectLicense', async () => { - const fakePath = "/rendered/path/userListDirectLicense"; - const expectedParameters = { - account_type: "accountTypeValue", - account: "accountValue", - user_list_direct_license: "userListDirectLicenseValue", - }; - const client = new ingestionserviceModule.v1.IngestionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.userListDirectLicensePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userListDirectLicensePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userListDirectLicensePath', () => { - const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchAccountTypeFromUserListDirectLicenseName', () => { - const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); - assert.strictEqual(result, "accountTypeValue"); - assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAccountFromUserListDirectLicenseName', () => { - const result = client.matchAccountFromUserListDirectLicenseName(fakePath); - assert.strictEqual(result, "accountValue"); - assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { - const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); - assert.strictEqual(result, "userListDirectLicenseValue"); - assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userListGlobalLicense', async () => { - const fakePath = "/rendered/path/userListGlobalLicense"; - const expectedParameters = { - account_type: "accountTypeValue", - account: "accountValue", - user_list_global_license: "userListGlobalLicenseValue", - }; - const client = new ingestionserviceModule.v1.IngestionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.userListGlobalLicensePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userListGlobalLicensePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userListGlobalLicensePath', () => { - const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchAccountTypeFromUserListGlobalLicenseName', () => { - const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); - assert.strictEqual(result, "accountTypeValue"); - assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAccountFromUserListGlobalLicenseName', () => { - const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); - assert.strictEqual(result, "accountValue"); - assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { - const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); - assert.strictEqual(result, "userListGlobalLicenseValue"); - assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userListGlobalLicenseCustomerInfo', async () => { - const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; - const expectedParameters = { - account_type: "accountTypeValue", - account: "accountValue", - user_list_global_license: "userListGlobalLicenseValue", - license_customer_info: "licenseCustomerInfoValue", - }; - const client = new ingestionserviceModule.v1.IngestionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userListGlobalLicenseCustomerInfoPath', () => { - const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { - const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); - assert.strictEqual(result, "accountTypeValue"); - assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { - const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); - assert.strictEqual(result, "accountValue"); - assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { - const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); - assert.strictEqual(result, "userListGlobalLicenseValue"); - assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { - const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); - assert.strictEqual(result, "licenseCustomerInfoValue"); - assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-ads-datamanager/tsconfig.json b/owl-bot-staging/google-ads-datamanager/tsconfig.json deleted file mode 100644 index ca73e7bfc82..00000000000 --- a/owl-bot-staging/google-ads-datamanager/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/owl-bot-staging/google-ads-datamanager/webpack.config.js b/owl-bot-staging/google-ads-datamanager/webpack.config.js deleted file mode 100644 index 1e866c6c232..00000000000 --- a/owl-bot-staging/google-ads-datamanager/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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-ads-datamanager/README.md b/packages/google-ads-datamanager/README.md index a3e07d1f8e6..a1888aea2a6 100644 --- a/packages/google-ads-datamanager/README.md +++ b/packages/google-ads-datamanager/README.md @@ -61,7 +61,25 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | 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) | +| retrieve insights | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js) | +| create partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js) | +| delete partner link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js) | +| search partner links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.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) | +| create user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js) | +| get user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js) | +| list user list direct licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js) | +| update user list direct license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js) | +| create user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js) | +| get user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js) | +| list user list global license customer infos | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js) | +| list user list global licenses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js) | +| update user list global license | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js) | +| create user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js) | +| delete user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js) | +| get user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js) | +| list user lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js) | +| update user list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js) | ## Supported Node.js Versions diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/age_range.proto 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 index 8bbda875154..a4a0d368b32 100644 --- a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/audience.proto @@ -43,10 +43,21 @@ message AudienceMember { // [Publisher Advertiser Identity Reconciliation (PAIR) // IDs](//support.google.com/admanager/answer/15067908). + // + // This feature is only available to data partners. PairData pair_data = 4; // Data identifying the user's mobile devices. MobileData mobile_data = 5; + + // Data related to unique identifiers for a user, as defined by the + // advertiser. + UserIdData user_id_data = 6; + + // Data related to publisher provided identifiers. + // + // This feature is only available to data partners. + PpidData ppid_data = 7; } // Optional. The consent setting for the user. @@ -55,6 +66,8 @@ message AudienceMember { // [PAIR](//support.google.com/admanager/answer/15067908) IDs for the audience. // At least one PAIR ID is required. +// +// This feature is only available to data partners. message PairData { // Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted // with an EC commutative cipher using publisher key for the @@ -71,3 +84,19 @@ message MobileData { // [AudienceMember][google.ads.datamanager.v1.AudienceMember]. repeated string mobile_ids = 1 [(google.api.field_behavior) = REQUIRED]; } + +// User id data holding the user id. +message UserIdData { + // Required. A unique identifier for a user, as defined by the + // advertiser. + string user_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Publisher provided identifiers data holding the ppids. At least one ppid is +// required. +// +// This feature is only available to data partners. +message PpidData { + // Required. The list of publisher provided identifiers for a user. + repeated string ppids = 1 [(google.api.field_behavior) = REQUIRED]; +} 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 index 5cdb43a689e..40d204e187c 100644 --- a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/destination.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.ads.datamanager.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; option csharp_namespace = "Google.Ads.DataManager.V1"; option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; @@ -25,6 +26,10 @@ 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"; +option (google.api.resource_definition) = { + type: "datamanager.googleapis.com/Account" + pattern: "accountTypes/{account_type}/accounts/{account}" +}; // The Google product you're sending data to. For example, a Google // Ads account. @@ -83,6 +88,9 @@ message ProductAccount { // Google Analytics. GOOGLE_ANALYTICS_PROPERTY = 5; + + // Google Ad Manager audience link. + GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6; } // Deprecated. Use 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 index 44c3ed5e79e..8abaf0ad934 100644 --- a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/error.proto @@ -25,6 +25,7 @@ option php_namespace = "Google\\Ads\\DataManager\\V1"; option ruby_package = "Google::Ads::DataManager::V1"; // Error reasons for Data Manager API. +// NOTE: This enum is not frozen and new values may be added in the future. enum ErrorReason { // Do not use this default value. ERROR_REASON_UNSPECIFIED = 0; @@ -188,4 +189,151 @@ enum ErrorReason { // Too many elements in a list in the request. TOO_MANY_ELEMENTS = 51; + + // The resource already exists. + ALREADY_EXISTS = 52; + + // Attempted to set an immutable field for an update request. + IMMUTABLE_FIELD_FOR_UPDATE = 53; + + // The resource name is invalid. + INVALID_RESOURCE_NAME = 54; + + // The query filter is invalid. + INVALID_FILTER = 55; + + // The update mask is invalid. + INVALID_UPDATE_MASK = 56; + + // The page token is invalid. + INVALID_PAGE_TOKEN = 57; + + // Cannot update a license that has been disabled. + CANNOT_UPDATE_DISABLED_LICENSE = 58; + + // Sensitive user lists cannot be licensed to this client. + CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59; + + // Cost too low for this license. + INSUFFICIENT_COST = 60; + + // Reseller license cannot be disabled since it is in use. + CANNOT_DISABLE_LICENSE = 61; + + // Invalid client account id. + INVALID_CLIENT_ACCOUNT_ID = 62; + + // Non-zero cost not allowed for this client account. + PRICING_ONLY_ZERO_COST_ALLOWED = 63; + + // Cost too high for this license. + PRICE_TOO_HIGH = 64; + + // Customer not allowed to create license. + CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65; + + // Pricing end date is invalid for this license. + INVALID_PRICING_END_DATE = 66; + + // Logical user list with shared or licensed segment cannot be licensed. + CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67; + + // Client customer's account type in the request does not match the customer's + // actual account type. + MISMATCHED_ACCOUNT_TYPE = 68; + + // License type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69; + + // Client customer type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70; + + // Invalid media share cost. + INVALID_MEDIA_SHARE_COST = 71; + + // Invalid cost type. + INVALID_COST_TYPE = 72; + + // UserList type does not support media share cost. + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73; + + // Max cost is only allowed for cost_type MEDIA_SHARE. + MAX_COST_NOT_ALLOWED = 74; + + // Commerce audience can only be directly licensed. + COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75; + + // The description is not valid. + INVALID_DESCRIPTION = 76; + + // The display name is not valid. + INVALID_DISPLAY_NAME = 77; + + // The display name is already being used for another user list for the + // account. + DISPLAY_NAME_ALREADY_USED = 78; + + // Ownership is required to modify the user list. + OWNERSHIP_REQUIRED_FOR_UPDATE = 79; + + // The user list type is read-only and does not support mutation. + USER_LIST_MUTATION_NOT_SUPPORTED = 80; + + // A user list which is privacy sensitive or legal rejected cannot be mutated + // by external users. + SENSITIVE_USER_LIST_IMMUTABLE = 81; + + // The remarketing user list's billable record field cannot be modified once + // it is set. + BILLABLE_RECORD_COUNT_IMMUTABLE = 82; + + // The user list name is reserved for system lists. + USER_LIST_NAME_RESERVED = 83; + + // The advertiser needs to be allowlisted to use remarketing lists created + // from advertiser uploaded data. + ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84; + + // The partner audience source is not supported for the user list type. + UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85; + + // Setting the `commerce_partner` field is only supported if the + // `partner_audience_source` is `COMMERCE_AUDIENCE`. + COMMERCE_PARTNER_NOT_ALLOWED = 86; + + // The `partner_audience_info` field is not supported for the user list type. + UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87; + + // Partner Match user lists cannot be created by manager accounts. + PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88; + + // The data partner is not allowlisted for THIRD_PARTY_PARTNER_DATA. + DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89; + + // The advertiser has not accepted the partner's terms of service. + ADVERTISER_TOS_NOT_ACCEPTED = 90; + + // The advertiser is not allowlisted for THIRD_PARTY_PARTNER_DATA. + ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91; + + // This user list type is not supported for this account. + USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92; + + // The `commerce_partner` field is invalid. + INVALID_COMMERCE_PARTNER = 93; + + // The data provider is not allowlisted to create commerce audiences. + CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94; + + // The user list upload key types are not supported. + UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95; + + // The ingested user list info config is not supported. + UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96; + + // The account types are not supported for the user list type. + UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97; + + // The account types are not supported for the partner link. + UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98; } 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 index 213af3f461c..0bd6ddd9c3a 100644 --- a/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto +++ b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/event.proto @@ -72,7 +72,7 @@ message Event { // Optional. The conversion value associated with the event, for value-based // conversions. - double conversion_value = 9 [(google.api.field_behavior) = OPTIONAL]; + optional 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]; diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/gender.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/insights_service.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/partner_link_service.proto 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 index 739851242af..64ca0cbe033 100644 --- 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 @@ -60,6 +60,12 @@ message RequestStatusPerDestination { // The status of the pair data ingestion to the destination. IngestPairDataStatus pair_data_ingestion_status = 3; + + // The status of the user id data ingestion to the destination. + IngestUserIdDataStatus user_id_data_ingestion_status = 4; + + // The status of the ppid data ingestion to the destination. + IngestPpidDataStatus ppid_data_ingestion_status = 5; } } @@ -75,6 +81,12 @@ message RequestStatusPerDestination { // The status of the pair data removal from the destination. RemovePairDataStatus pair_data_removal_status = 3; + + // The status of the user id data removal from the destination. + RemoveUserIdDataStatus user_id_data_removal_status = 4; + + // The status of the ppid data removal from the destination. + RemovePpidDataStatus ppid_data_removal_status = 5; } } @@ -170,6 +182,60 @@ message RequestStatusPerDestination { int64 pair_id_count = 2; } + // The status of the user id data ingestion to the destination containing + // stats related to the ingestion. + message IngestUserIdDataStatus { + // 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 ids sent in the upload request for the + // destination. Includes all user ids in the request, regardless of + // whether they were successfully ingested or not. + int64 user_id_count = 2; + } + + // The status of the user id data removal from the destination. + message RemoveUserIdDataStatus { + // 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 ids sent in the removal request. Includes all + // user ids in the request, regardless of whether they were successfully + // removed or not. + int64 user_id_count = 2; + } + + // The status of the ppid data ingestion to the destination containing stats + // related to the ingestion. + message IngestPpidDataStatus { + // 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 ppids sent in the upload request for the + // destination. Includes all ppids in the request, regardless of + // whether they were successfully ingested or not. + int64 ppid_count = 2; + } + + // The status of the ppid data removal from the destination. + message RemovePpidDataStatus { + // 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 ppids sent in the removal request. Includes all + // ppids in the request, regardless of whether they were successfully + // removed or not. + int64 ppid_count = 2; + } + // A destination within a DM API request. Destination destination = 1; diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_direct_license_service.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_service.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_global_license_type.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_metrics.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_pricing.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_license_status.proto diff --git a/owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto b/packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto similarity index 100% rename from owl-bot-staging/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto rename to packages/google-ads-datamanager/protos/google/ads/datamanager/v1/user_list_service.proto diff --git a/packages/google-ads-datamanager/protos/protos.d.ts b/packages/google-ads-datamanager/protos/protos.d.ts index 1df2fdf013e..db34d7f0bd5 100644 --- a/packages/google-ads-datamanager/protos/protos.d.ts +++ b/packages/google-ads-datamanager/protos/protos.d.ts @@ -26,6 +26,18 @@ export namespace google { /** Namespace v1. */ namespace v1 { + /** AgeRange enum. */ + enum AgeRange { + AGE_RANGE_UNSPECIFIED = 0, + AGE_RANGE_UNKNOWN = 1, + AGE_RANGE_18_24 = 2, + AGE_RANGE_25_34 = 3, + AGE_RANGE_35_44 = 4, + AGE_RANGE_45_54 = 5, + AGE_RANGE_55_64 = 6, + AGE_RANGE_65_UP = 7 + } + /** Properties of an AudienceMember. */ interface IAudienceMember { @@ -41,6 +53,12 @@ export namespace google { /** AudienceMember mobileData */ mobileData?: (google.ads.datamanager.v1.IMobileData|null); + /** AudienceMember userIdData */ + userIdData?: (google.ads.datamanager.v1.IUserIdData|null); + + /** AudienceMember ppidData */ + ppidData?: (google.ads.datamanager.v1.IPpidData|null); + /** AudienceMember consent */ consent?: (google.ads.datamanager.v1.IConsent|null); } @@ -66,11 +84,17 @@ export namespace google { /** AudienceMember mobileData. */ public mobileData?: (google.ads.datamanager.v1.IMobileData|null); + /** AudienceMember userIdData. */ + public userIdData?: (google.ads.datamanager.v1.IUserIdData|null); + + /** AudienceMember ppidData. */ + public ppidData?: (google.ads.datamanager.v1.IPpidData|null); + /** AudienceMember consent. */ public consent?: (google.ads.datamanager.v1.IConsent|null); /** AudienceMember data. */ - public data?: ("userData"|"pairData"|"mobileData"); + public data?: ("userData"|"pairData"|"mobileData"|"userIdData"|"ppidData"); /** * Creates a new AudienceMember instance using the specified properties. @@ -344,6 +368,200 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a UserIdData. */ + interface IUserIdData { + + /** UserIdData userId */ + userId?: (string|null); + } + + /** Represents a UserIdData. */ + class UserIdData implements IUserIdData { + + /** + * Constructs a new UserIdData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserIdData); + + /** UserIdData userId. */ + public userId: string; + + /** + * Creates a new UserIdData instance using the specified properties. + * @param [properties] Properties to set + * @returns UserIdData instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserIdData): google.ads.datamanager.v1.UserIdData; + + /** + * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @param message UserIdData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @param message UserIdData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserIdData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserIdData + * @throws {Error} If the payload is not a 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.UserIdData; + + /** + * Decodes a UserIdData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserIdData + * @throws {Error} If the payload is 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.UserIdData; + + /** + * Verifies a UserIdData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserIdData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdData; + + /** + * Creates a plain object from a UserIdData message. Also converts values to other types if specified. + * @param message UserIdData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserIdData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserIdData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserIdData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PpidData. */ + interface IPpidData { + + /** PpidData ppids */ + ppids?: (string[]|null); + } + + /** Represents a PpidData. */ + class PpidData implements IPpidData { + + /** + * Constructs a new PpidData. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPpidData); + + /** PpidData ppids. */ + public ppids: string[]; + + /** + * Creates a new PpidData instance using the specified properties. + * @param [properties] Properties to set + * @returns PpidData instance + */ + public static create(properties?: google.ads.datamanager.v1.IPpidData): google.ads.datamanager.v1.PpidData; + + /** + * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @param message PpidData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @param message PpidData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPpidData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PpidData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PpidData + * @throws {Error} If the payload is not a 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.PpidData; + + /** + * Decodes a PpidData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PpidData + * @throws {Error} If the payload is 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.PpidData; + + /** + * Verifies a PpidData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PpidData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PpidData + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PpidData; + + /** + * Creates a plain object from a PpidData message. Also converts values to other types if specified. + * @param message PpidData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PpidData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PpidData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PpidData + * @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 { @@ -1362,7 +1580,8 @@ export namespace google { DISPLAY_VIDEO_PARTNER = 2, DISPLAY_VIDEO_ADVERTISER = 3, DATA_PARTNER = 4, - GOOGLE_ANALYTICS_PROPERTY = 5 + GOOGLE_ANALYTICS_PROPERTY = 5, + GOOGLE_AD_MANAGER_AUDIENCE_LINK = 6 } } @@ -1885,7 +2104,54 @@ export namespace google { INVALID_REQUEST_ID = 48, MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT = 49, FIELD_VALUE_TOO_LONG = 50, - TOO_MANY_ELEMENTS = 51 + TOO_MANY_ELEMENTS = 51, + ALREADY_EXISTS = 52, + IMMUTABLE_FIELD_FOR_UPDATE = 53, + INVALID_RESOURCE_NAME = 54, + INVALID_FILTER = 55, + INVALID_UPDATE_MASK = 56, + INVALID_PAGE_TOKEN = 57, + CANNOT_UPDATE_DISABLED_LICENSE = 58, + CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST = 59, + INSUFFICIENT_COST = 60, + CANNOT_DISABLE_LICENSE = 61, + INVALID_CLIENT_ACCOUNT_ID = 62, + PRICING_ONLY_ZERO_COST_ALLOWED = 63, + PRICE_TOO_HIGH = 64, + CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE = 65, + INVALID_PRICING_END_DATE = 66, + CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT = 67, + MISMATCHED_ACCOUNT_TYPE = 68, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE = 69, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER = 70, + INVALID_MEDIA_SHARE_COST = 71, + INVALID_COST_TYPE = 72, + MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST = 73, + MAX_COST_NOT_ALLOWED = 74, + COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED = 75, + INVALID_DESCRIPTION = 76, + INVALID_DISPLAY_NAME = 77, + DISPLAY_NAME_ALREADY_USED = 78, + OWNERSHIP_REQUIRED_FOR_UPDATE = 79, + USER_LIST_MUTATION_NOT_SUPPORTED = 80, + SENSITIVE_USER_LIST_IMMUTABLE = 81, + BILLABLE_RECORD_COUNT_IMMUTABLE = 82, + USER_LIST_NAME_RESERVED = 83, + ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA = 84, + UNSUPPORTED_PARTNER_AUDIENCE_SOURCE = 85, + COMMERCE_PARTNER_NOT_ALLOWED = 86, + UNSUPPORTED_PARTNER_AUDIENCE_INFO = 87, + PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED = 88, + DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 89, + ADVERTISER_TOS_NOT_ACCEPTED = 90, + ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA = 91, + USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT = 92, + INVALID_COMMERCE_PARTNER = 93, + CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE = 94, + UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES = 95, + UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG = 96, + UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE = 97, + UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK = 98 } /** Properties of an Event. */ @@ -1983,7 +2249,7 @@ export namespace google { public currency: string; /** Event conversionValue. */ - public conversionValue: number; + public conversionValue?: (number|null); /** Event eventSource. */ public eventSource: (google.ads.datamanager.v1.EventSource|keyof typeof google.ads.datamanager.v1.EventSource); @@ -2767,6 +3033,14 @@ export namespace google { HIGH = 3 } + /** Gender enum. */ + enum Gender { + GENDER_UNSPECIFIED = 0, + GENDER_UNKNOWN = 1, + GENDER_MALE = 2, + GENDER_FEMALE = 3 + } + /** Represents an IngestionService */ class IngestionService extends $protobuf.rpc.Service { @@ -3906,6 +4180,12 @@ export namespace google { /** IngestAudienceMembersStatus pairDataIngestionStatus */ pairDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null); + + /** IngestAudienceMembersStatus userIdDataIngestionStatus */ + userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); + + /** IngestAudienceMembersStatus ppidDataIngestionStatus */ + ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null); } /** Represents an IngestAudienceMembersStatus. */ @@ -3926,8 +4206,14 @@ export namespace google { /** IngestAudienceMembersStatus pairDataIngestionStatus. */ public pairDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPairDataStatus|null); + /** IngestAudienceMembersStatus userIdDataIngestionStatus. */ + public userIdDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null); + + /** IngestAudienceMembersStatus ppidDataIngestionStatus. */ + public ppidDataIngestionStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null); + /** IngestAudienceMembersStatus status. */ - public status?: ("userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"); + public status?: ("userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"); /** * Creates a new IngestAudienceMembersStatus instance using the specified properties. @@ -4018,6 +4304,12 @@ export namespace google { /** RemoveAudienceMembersStatus pairDataRemovalStatus */ pairDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null); + + /** RemoveAudienceMembersStatus userIdDataRemovalStatus */ + userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); + + /** RemoveAudienceMembersStatus ppidDataRemovalStatus */ + ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null); } /** Represents a RemoveAudienceMembersStatus. */ @@ -4038,8 +4330,14 @@ export namespace google { /** RemoveAudienceMembersStatus pairDataRemovalStatus. */ public pairDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePairDataStatus|null); + /** RemoveAudienceMembersStatus userIdDataRemovalStatus. */ + public userIdDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null); + + /** RemoveAudienceMembersStatus ppidDataRemovalStatus. */ + public ppidDataRemovalStatus?: (google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null); + /** RemoveAudienceMembersStatus status. */ - public status?: ("userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"); + public status?: ("userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"); /** * Creates a new RemoveAudienceMembersStatus instance using the specified properties. @@ -4839,590 +5137,6823 @@ export namespace google { */ 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 IngestUserIdDataStatus. */ + interface IIngestUserIdDataStatus { - /** Properties of an ErrorInfo. */ - interface IErrorInfo { + /** IngestUserIdDataStatus recordCount */ + recordCount?: (number|Long|string|null); - /** ErrorInfo errorCounts */ - errorCounts?: (google.ads.datamanager.v1.IErrorCount[]|null); - } + /** IngestUserIdDataStatus userIdCount */ + userIdCount?: (number|Long|string|null); + } - /** Represents an ErrorInfo. */ - class ErrorInfo implements IErrorInfo { + /** Represents an IngestUserIdDataStatus. */ + class IngestUserIdDataStatus implements IIngestUserIdDataStatus { - /** - * Constructs a new ErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.IErrorInfo); + /** + * Constructs a new IngestUserIdDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus); - /** ErrorInfo errorCounts. */ - public errorCounts: google.ads.datamanager.v1.IErrorCount[]; + /** IngestUserIdDataStatus recordCount. */ + public recordCount: (number|Long|string); - /** - * 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; + /** IngestUserIdDataStatus userIdCount. */ + public userIdCount: (number|Long|string); - /** - * 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; + /** + * Creates a new IngestUserIdDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestUserIdDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; - /** - * 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; + /** + * Encodes the specified IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @param message IngestUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, 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; + /** + * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @param message IngestUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestUserIdDataStatus + * @throws {Error} If the payload is not a 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.IngestUserIdDataStatus; - /** - * 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); + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestUserIdDataStatus + * @throws {Error} If the payload is 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.IngestUserIdDataStatus; - /** - * 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; + /** + * Verifies an IngestUserIdDataStatus message. + * @param message Plain 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 IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestUserIdDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus; + + /** + * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. + * @param message IngestUserIdDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestUserIdDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestUserIdDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveUserIdDataStatus. */ + interface IRemoveUserIdDataStatus { + + /** RemoveUserIdDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemoveUserIdDataStatus userIdCount */ + userIdCount?: (number|Long|string|null); + } + + /** Represents a RemoveUserIdDataStatus. */ + class RemoveUserIdDataStatus implements IRemoveUserIdDataStatus { + + /** + * Constructs a new RemoveUserIdDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus); + + /** RemoveUserIdDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemoveUserIdDataStatus userIdCount. */ + public userIdCount: (number|Long|string); + + /** + * Creates a new RemoveUserIdDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveUserIdDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; + + /** + * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @param message RemoveUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @param message RemoveUserIdDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveUserIdDataStatus + * @throws {Error} If the payload is not a 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.RemoveUserIdDataStatus; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveUserIdDataStatus + * @throws {Error} If the payload is 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.RemoveUserIdDataStatus; + + /** + * Verifies a RemoveUserIdDataStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveUserIdDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus; + + /** + * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. + * @param message RemoveUserIdDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveUserIdDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveUserIdDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestPpidDataStatus. */ + interface IIngestPpidDataStatus { + + /** IngestPpidDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** IngestPpidDataStatus ppidCount */ + ppidCount?: (number|Long|string|null); + } + + /** Represents an IngestPpidDataStatus. */ + class IngestPpidDataStatus implements IIngestPpidDataStatus { + + /** + * Constructs a new IngestPpidDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus); + + /** IngestPpidDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** IngestPpidDataStatus ppidCount. */ + public ppidCount: (number|Long|string); + + /** + * Creates a new IngestPpidDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestPpidDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; + + /** + * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @param message IngestPpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @param message IngestPpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestPpidDataStatus + * @throws {Error} If the payload is not a 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.IngestPpidDataStatus; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestPpidDataStatus + * @throws {Error} If the payload is 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.IngestPpidDataStatus; + + /** + * Verifies an IngestPpidDataStatus message. + * @param message Plain 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 IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestPpidDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus; + + /** + * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. + * @param message IngestPpidDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestPpidDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestPpidDataStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePpidDataStatus. */ + interface IRemovePpidDataStatus { + + /** RemovePpidDataStatus recordCount */ + recordCount?: (number|Long|string|null); + + /** RemovePpidDataStatus ppidCount */ + ppidCount?: (number|Long|string|null); + } + + /** Represents a RemovePpidDataStatus. */ + class RemovePpidDataStatus implements IRemovePpidDataStatus { + + /** + * Constructs a new RemovePpidDataStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus); + + /** RemovePpidDataStatus recordCount. */ + public recordCount: (number|Long|string); + + /** RemovePpidDataStatus ppidCount. */ + public ppidCount: (number|Long|string); + + /** + * Creates a new RemovePpidDataStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePpidDataStatus instance + */ + public static create(properties?: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; + + /** + * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @param message RemovePpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @param message RemovePpidDataStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePpidDataStatus + * @throws {Error} If the payload is not a 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.RemovePpidDataStatus; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePpidDataStatus + * @throws {Error} If the payload is 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.RemovePpidDataStatus; + + /** + * Verifies a RemovePpidDataStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePpidDataStatus + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus; + + /** + * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. + * @param message RemovePpidDataStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePpidDataStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePpidDataStatus + * @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 }; + 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_AWS_AUTH_FAILED = 27, + 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, + PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9 + } + + /** 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 + } + + /** Represents a MarketingDataInsightsService */ + class MarketingDataInsightsService extends $protobuf.rpc.Service { + + /** + * Constructs a new MarketingDataInsightsService 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 MarketingDataInsightsService 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): MarketingDataInsightsService; + + /** + * Calls RetrieveInsights. + * @param request RetrieveInsightsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RetrieveInsightsResponse + */ + public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest, callback: google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback): void; + + /** + * Calls RetrieveInsights. + * @param request RetrieveInsightsRequest message or plain object + * @returns Promise + */ + public retrieveInsights(request: google.ads.datamanager.v1.IRetrieveInsightsRequest): Promise; + } + + namespace MarketingDataInsightsService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. + * @param error Error, if any + * @param [response] RetrieveInsightsResponse + */ + type RetrieveInsightsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.RetrieveInsightsResponse) => void; + } + + /** Properties of a RetrieveInsightsRequest. */ + interface IRetrieveInsightsRequest { + + /** RetrieveInsightsRequest parent */ + parent?: (string|null); + + /** RetrieveInsightsRequest baseline */ + baseline?: (google.ads.datamanager.v1.IBaseline|null); + + /** RetrieveInsightsRequest userListId */ + userListId?: (string|null); + } + + /** Represents a RetrieveInsightsRequest. */ + class RetrieveInsightsRequest implements IRetrieveInsightsRequest { + + /** + * Constructs a new RetrieveInsightsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest); + + /** RetrieveInsightsRequest parent. */ + public parent: string; + + /** RetrieveInsightsRequest baseline. */ + public baseline?: (google.ads.datamanager.v1.IBaseline|null); + + /** RetrieveInsightsRequest userListId. */ + public userListId: string; + + /** + * Creates a new RetrieveInsightsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveInsightsRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsRequest): google.ads.datamanager.v1.RetrieveInsightsRequest; + + /** + * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @param message RetrieveInsightsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @param message RetrieveInsightsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveInsightsRequest + * @throws {Error} If the payload is not a 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.RetrieveInsightsRequest; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveInsightsRequest + * @throws {Error} If the payload is 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.RetrieveInsightsRequest; + + /** + * Verifies a RetrieveInsightsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveInsightsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsRequest; + + /** + * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. + * @param message RetrieveInsightsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveInsightsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveInsightsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Baseline. */ + interface IBaseline { + + /** Baseline baselineLocation */ + baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); + + /** Baseline locationAutoDetectionEnabled */ + locationAutoDetectionEnabled?: (boolean|null); + } + + /** Represents a Baseline. */ + class Baseline implements IBaseline { + + /** + * Constructs a new Baseline. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IBaseline); + + /** Baseline baselineLocation. */ + public baselineLocation?: (google.ads.datamanager.v1.Baseline.ILocation|null); + + /** Baseline locationAutoDetectionEnabled. */ + public locationAutoDetectionEnabled?: (boolean|null); + + /** Baseline baseline. */ + public baseline?: ("baselineLocation"|"locationAutoDetectionEnabled"); + + /** + * Creates a new Baseline instance using the specified properties. + * @param [properties] Properties to set + * @returns Baseline instance + */ + public static create(properties?: google.ads.datamanager.v1.IBaseline): google.ads.datamanager.v1.Baseline; + + /** + * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @param message Baseline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @param message Baseline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IBaseline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Baseline message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Baseline + * @throws {Error} If the payload is not a 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.Baseline; + + /** + * Decodes a Baseline message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Baseline + * @throws {Error} If the payload is 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.Baseline; + + /** + * Verifies a Baseline message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Baseline message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Baseline + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.Baseline; + + /** + * Creates a plain object from a Baseline message. Also converts values to other types if specified. + * @param message Baseline + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.Baseline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Baseline to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Baseline + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Baseline { + + /** Properties of a Location. */ + interface ILocation { + + /** Location regionCodes */ + regionCodes?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.Baseline.ILocation); + + /** Location regionCodes. */ + public regionCodes: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.ads.datamanager.v1.Baseline.ILocation): google.ads.datamanager.v1.Baseline.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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 RetrieveInsightsResponse. */ + interface IRetrieveInsightsResponse { + + /** RetrieveInsightsResponse marketingDataInsights */ + marketingDataInsights?: (google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]|null); + } + + /** Represents a RetrieveInsightsResponse. */ + class RetrieveInsightsResponse implements IRetrieveInsightsResponse { + + /** + * Constructs a new RetrieveInsightsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse); + + /** RetrieveInsightsResponse marketingDataInsights. */ + public marketingDataInsights: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight[]; + + /** + * Creates a new RetrieveInsightsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RetrieveInsightsResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IRetrieveInsightsResponse): google.ads.datamanager.v1.RetrieveInsightsResponse; + + /** + * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @param message RetrieveInsightsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @param message RetrieveInsightsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IRetrieveInsightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetrieveInsightsResponse + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetrieveInsightsResponse + * @throws {Error} If the payload is 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.RetrieveInsightsResponse; + + /** + * Verifies a RetrieveInsightsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetrieveInsightsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse; + + /** + * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. + * @param message RetrieveInsightsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetrieveInsightsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetrieveInsightsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RetrieveInsightsResponse { + + /** Properties of a MarketingDataInsight. */ + interface IMarketingDataInsight { + + /** MarketingDataInsight dimension */ + dimension?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null); + + /** MarketingDataInsight attributes */ + attributes?: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]|null); + } + + /** Represents a MarketingDataInsight. */ + class MarketingDataInsight implements IMarketingDataInsight { + + /** + * Constructs a new MarketingDataInsight. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight); + + /** MarketingDataInsight dimension. */ + public dimension: (google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|keyof typeof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension); + + /** MarketingDataInsight attributes. */ + public attributes: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute[]; + + /** + * Creates a new MarketingDataInsight instance using the specified properties. + * @param [properties] Properties to set + * @returns MarketingDataInsight instance + */ + public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @param message MarketingDataInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @param message MarketingDataInsight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarketingDataInsight + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarketingDataInsight + * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Verifies a MarketingDataInsight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarketingDataInsight + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight; + + /** + * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. + * @param message MarketingDataInsight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarketingDataInsight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingDataInsight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MarketingDataInsight { + + /** AudienceInsightsDimension enum. */ + enum AudienceInsightsDimension { + AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED = 0, + AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN = 1, + AFFINITY_USER_INTEREST = 2, + IN_MARKET_USER_INTEREST = 3, + AGE_RANGE = 4, + GENDER = 5 + } + + /** Properties of a MarketingDataInsightsAttribute. */ + interface IMarketingDataInsightsAttribute { + + /** MarketingDataInsightsAttribute userInterestId */ + userInterestId?: (number|Long|string|null); + + /** MarketingDataInsightsAttribute lift */ + lift?: (number|null); + + /** MarketingDataInsightsAttribute ageRange */ + ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); + + /** MarketingDataInsightsAttribute gender */ + gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); + } + + /** Represents a MarketingDataInsightsAttribute. */ + class MarketingDataInsightsAttribute implements IMarketingDataInsightsAttribute { + + /** + * Constructs a new MarketingDataInsightsAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute); + + /** MarketingDataInsightsAttribute userInterestId. */ + public userInterestId?: (number|Long|string|null); + + /** MarketingDataInsightsAttribute lift. */ + public lift?: (number|null); + + /** MarketingDataInsightsAttribute ageRange. */ + public ageRange?: (google.ads.datamanager.v1.AgeRange|keyof typeof google.ads.datamanager.v1.AgeRange|null); + + /** MarketingDataInsightsAttribute gender. */ + public gender?: (google.ads.datamanager.v1.Gender|keyof typeof google.ads.datamanager.v1.Gender|null); + + /** + * Creates a new MarketingDataInsightsAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns MarketingDataInsightsAttribute instance + */ + public static create(properties?: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @param message MarketingDataInsightsAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @param message MarketingDataInsightsAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarketingDataInsightsAttribute + * @throws {Error} If the payload is 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Verifies a MarketingDataInsightsAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarketingDataInsightsAttribute + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute; + + /** + * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. + * @param message MarketingDataInsightsAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarketingDataInsightsAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingDataInsightsAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Represents a PartnerLinkService */ + class PartnerLinkService extends $protobuf.rpc.Service { + + /** + * Constructs a new PartnerLinkService 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 PartnerLinkService 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): PartnerLinkService; + + /** + * Calls CreatePartnerLink. + * @param request CreatePartnerLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PartnerLink + */ + public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback): void; + + /** + * Calls CreatePartnerLink. + * @param request CreatePartnerLinkRequest message or plain object + * @returns Promise + */ + public createPartnerLink(request: google.ads.datamanager.v1.ICreatePartnerLinkRequest): Promise; + + /** + * Calls DeletePartnerLink. + * @param request DeletePartnerLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest, callback: google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback): void; + + /** + * Calls DeletePartnerLink. + * @param request DeletePartnerLinkRequest message or plain object + * @returns Promise + */ + public deletePartnerLink(request: google.ads.datamanager.v1.IDeletePartnerLinkRequest): Promise; + + /** + * Calls SearchPartnerLinks. + * @param request SearchPartnerLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse + */ + public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest, callback: google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback): void; + + /** + * Calls SearchPartnerLinks. + * @param request SearchPartnerLinksRequest message or plain object + * @returns Promise + */ + public searchPartnerLinks(request: google.ads.datamanager.v1.ISearchPartnerLinksRequest): Promise; + } + + namespace PartnerLinkService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. + * @param error Error, if any + * @param [response] PartnerLink + */ + type CreatePartnerLinkCallback = (error: (Error|null), response?: google.ads.datamanager.v1.PartnerLink) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePartnerLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. + * @param error Error, if any + * @param [response] SearchPartnerLinksResponse + */ + type SearchPartnerLinksCallback = (error: (Error|null), response?: google.ads.datamanager.v1.SearchPartnerLinksResponse) => void; + } + + /** Properties of a CreatePartnerLinkRequest. */ + interface ICreatePartnerLinkRequest { + + /** CreatePartnerLinkRequest parent */ + parent?: (string|null); + + /** CreatePartnerLinkRequest partnerLink */ + partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); + } + + /** Represents a CreatePartnerLinkRequest. */ + class CreatePartnerLinkRequest implements ICreatePartnerLinkRequest { + + /** + * Constructs a new CreatePartnerLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest); + + /** CreatePartnerLinkRequest parent. */ + public parent: string; + + /** CreatePartnerLinkRequest partnerLink. */ + public partnerLink?: (google.ads.datamanager.v1.IPartnerLink|null); + + /** + * Creates a new CreatePartnerLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePartnerLinkRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreatePartnerLinkRequest): google.ads.datamanager.v1.CreatePartnerLinkRequest; + + /** + * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @param message CreatePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @param message CreatePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreatePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePartnerLinkRequest + * @throws {Error} If the payload is not a 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.CreatePartnerLinkRequest; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePartnerLinkRequest + * @throws {Error} If the payload is 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.CreatePartnerLinkRequest; + + /** + * Verifies a CreatePartnerLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePartnerLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreatePartnerLinkRequest; + + /** + * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. + * @param message CreatePartnerLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreatePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePartnerLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePartnerLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePartnerLinkRequest. */ + interface IDeletePartnerLinkRequest { + + /** DeletePartnerLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeletePartnerLinkRequest. */ + class DeletePartnerLinkRequest implements IDeletePartnerLinkRequest { + + /** + * Constructs a new DeletePartnerLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest); + + /** DeletePartnerLinkRequest name. */ + public name: string; + + /** + * Creates a new DeletePartnerLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePartnerLinkRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IDeletePartnerLinkRequest): google.ads.datamanager.v1.DeletePartnerLinkRequest; + + /** + * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @param message DeletePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @param message DeletePartnerLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IDeletePartnerLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePartnerLinkRequest + * @throws {Error} If the payload is not a 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.DeletePartnerLinkRequest; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePartnerLinkRequest + * @throws {Error} If the payload is 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.DeletePartnerLinkRequest; + + /** + * Verifies a DeletePartnerLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePartnerLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeletePartnerLinkRequest; + + /** + * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. + * @param message DeletePartnerLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.DeletePartnerLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePartnerLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePartnerLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchPartnerLinksRequest. */ + interface ISearchPartnerLinksRequest { + + /** SearchPartnerLinksRequest parent */ + parent?: (string|null); + + /** SearchPartnerLinksRequest pageSize */ + pageSize?: (number|null); + + /** SearchPartnerLinksRequest pageToken */ + pageToken?: (string|null); + + /** SearchPartnerLinksRequest filter */ + filter?: (string|null); + } + + /** Represents a SearchPartnerLinksRequest. */ + class SearchPartnerLinksRequest implements ISearchPartnerLinksRequest { + + /** + * Constructs a new SearchPartnerLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest); + + /** SearchPartnerLinksRequest parent. */ + public parent: string; + + /** SearchPartnerLinksRequest pageSize. */ + public pageSize: number; + + /** SearchPartnerLinksRequest pageToken. */ + public pageToken: string; + + /** SearchPartnerLinksRequest filter. */ + public filter: string; + + /** + * Creates a new SearchPartnerLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchPartnerLinksRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksRequest): google.ads.datamanager.v1.SearchPartnerLinksRequest; + + /** + * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @param message SearchPartnerLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @param message SearchPartnerLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchPartnerLinksRequest + * @throws {Error} If the payload is not a 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.SearchPartnerLinksRequest; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchPartnerLinksRequest + * @throws {Error} If the payload is 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.SearchPartnerLinksRequest; + + /** + * Verifies a SearchPartnerLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchPartnerLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksRequest; + + /** + * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. + * @param message SearchPartnerLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchPartnerLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchPartnerLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchPartnerLinksResponse. */ + interface ISearchPartnerLinksResponse { + + /** SearchPartnerLinksResponse partnerLinks */ + partnerLinks?: (google.ads.datamanager.v1.IPartnerLink[]|null); + + /** SearchPartnerLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchPartnerLinksResponse. */ + class SearchPartnerLinksResponse implements ISearchPartnerLinksResponse { + + /** + * Constructs a new SearchPartnerLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse); + + /** SearchPartnerLinksResponse partnerLinks. */ + public partnerLinks: google.ads.datamanager.v1.IPartnerLink[]; + + /** SearchPartnerLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchPartnerLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchPartnerLinksResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.ISearchPartnerLinksResponse): google.ads.datamanager.v1.SearchPartnerLinksResponse; + + /** + * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @param message SearchPartnerLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @param message SearchPartnerLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISearchPartnerLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchPartnerLinksResponse + * @throws {Error} If the payload is not a 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.SearchPartnerLinksResponse; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchPartnerLinksResponse + * @throws {Error} If the payload is 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.SearchPartnerLinksResponse; + + /** + * Verifies a SearchPartnerLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchPartnerLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SearchPartnerLinksResponse; + + /** + * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. + * @param message SearchPartnerLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SearchPartnerLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchPartnerLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchPartnerLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartnerLink. */ + interface IPartnerLink { + + /** PartnerLink name */ + name?: (string|null); + + /** PartnerLink partnerLinkId */ + partnerLinkId?: (string|null); + + /** PartnerLink owningAccount */ + owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** PartnerLink partnerAccount */ + partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); + } + + /** Represents a PartnerLink. */ + class PartnerLink implements IPartnerLink { + + /** + * Constructs a new PartnerLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPartnerLink); + + /** PartnerLink name. */ + public name: string; + + /** PartnerLink partnerLinkId. */ + public partnerLinkId: string; + + /** PartnerLink owningAccount. */ + public owningAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** PartnerLink partnerAccount. */ + public partnerAccount?: (google.ads.datamanager.v1.IProductAccount|null); + + /** + * Creates a new PartnerLink instance using the specified properties. + * @param [properties] Properties to set + * @returns PartnerLink instance + */ + public static create(properties?: google.ads.datamanager.v1.IPartnerLink): google.ads.datamanager.v1.PartnerLink; + + /** + * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @param message PartnerLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @param message PartnerLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartnerLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartnerLink + * @throws {Error} If the payload is not a 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.PartnerLink; + + /** + * Decodes a PartnerLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartnerLink + * @throws {Error} If the payload is 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.PartnerLink; + + /** + * Verifies a PartnerLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartnerLink + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerLink; + + /** + * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. + * @param message PartnerLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PartnerLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartnerLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartnerLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserList. */ + interface IUserList { + + /** UserList name */ + name?: (string|null); + + /** UserList id */ + id?: (number|Long|string|null); + + /** UserList readOnly */ + readOnly?: (boolean|null); + + /** UserList displayName */ + displayName?: (string|null); + + /** UserList description */ + description?: (string|null); + + /** UserList membershipStatus */ + membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); + + /** UserList integrationCode */ + integrationCode?: (string|null); + + /** UserList membershipDuration */ + membershipDuration?: (google.protobuf.IDuration|null); + + /** UserList closingReason */ + closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); + + /** UserList accessReason */ + accessReason?: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason|null); + + /** UserList accountAccessStatus */ + accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); + + /** UserList sizeInfo */ + sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); + + /** UserList targetNetworkInfo */ + targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); + + /** UserList ingestedUserListInfo */ + ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); + } + + /** Represents a UserList. */ + class UserList implements IUserList { + + /** + * Constructs a new UserList. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserList); + + /** UserList name. */ + public name: string; + + /** UserList id. */ + public id: (number|Long|string); + + /** UserList readOnly. */ + public readOnly: boolean; + + /** UserList displayName. */ + public displayName?: (string|null); + + /** UserList description. */ + public description?: (string|null); + + /** UserList membershipStatus. */ + public membershipStatus?: (google.ads.datamanager.v1.UserList.MembershipStatus|keyof typeof google.ads.datamanager.v1.UserList.MembershipStatus|null); + + /** UserList integrationCode. */ + public integrationCode?: (string|null); + + /** UserList membershipDuration. */ + public membershipDuration?: (google.protobuf.IDuration|null); + + /** UserList closingReason. */ + public closingReason?: (google.ads.datamanager.v1.UserList.ClosingReason|keyof typeof google.ads.datamanager.v1.UserList.ClosingReason|null); + + /** UserList accessReason. */ + public accessReason: (google.ads.datamanager.v1.UserList.AccessReason|keyof typeof google.ads.datamanager.v1.UserList.AccessReason); + + /** UserList accountAccessStatus. */ + public accountAccessStatus?: (google.ads.datamanager.v1.UserList.AccessStatus|keyof typeof google.ads.datamanager.v1.UserList.AccessStatus|null); + + /** UserList sizeInfo. */ + public sizeInfo?: (google.ads.datamanager.v1.ISizeInfo|null); + + /** UserList targetNetworkInfo. */ + public targetNetworkInfo?: (google.ads.datamanager.v1.ITargetNetworkInfo|null); + + /** UserList ingestedUserListInfo. */ + public ingestedUserListInfo?: (google.ads.datamanager.v1.IIngestedUserListInfo|null); + + /** UserList userListInfo. */ + public userListInfo?: "ingestedUserListInfo"; + + /** + * Creates a new UserList instance using the specified properties. + * @param [properties] Properties to set + * @returns UserList instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserList): google.ads.datamanager.v1.UserList; + + /** + * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @param message UserList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @param message UserList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserList + * @throws {Error} If the payload is not a 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.UserList; + + /** + * Decodes a UserList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserList + * @throws {Error} If the payload is 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.UserList; + + /** + * Verifies a UserList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserList + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserList; + + /** + * Creates a plain object from a UserList message. Also converts values to other types if specified. + * @param message UserList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserList { + + /** MembershipStatus enum. */ + enum MembershipStatus { + MEMBERSHIP_STATUS_UNSPECIFIED = 0, + OPEN = 1, + CLOSED = 2 + } + + /** ClosingReason enum. */ + enum ClosingReason { + CLOSING_REASON_UNSPECIFIED = 0, + UNUSED = 1 + } + + /** AccessReason enum. */ + enum AccessReason { + ACCESS_REASON_UNSPECIFIED = 0, + OWNED = 1, + SHARED = 2, + LICENSED = 3, + SUBSCRIBED = 4, + AFFILIATED = 5 + } + + /** AccessStatus enum. */ + enum AccessStatus { + ACCESS_STATUS_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } + + /** Properties of a SizeInfo. */ + interface ISizeInfo { + + /** SizeInfo displayNetworkMembersCount */ + displayNetworkMembersCount?: (number|Long|string|null); + + /** SizeInfo searchNetworkMembersCount */ + searchNetworkMembersCount?: (number|Long|string|null); + } + + /** Represents a SizeInfo. */ + class SizeInfo implements ISizeInfo { + + /** + * Constructs a new SizeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ISizeInfo); + + /** SizeInfo displayNetworkMembersCount. */ + public displayNetworkMembersCount: (number|Long|string); + + /** SizeInfo searchNetworkMembersCount. */ + public searchNetworkMembersCount: (number|Long|string); + + /** + * Creates a new SizeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SizeInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.ISizeInfo): google.ads.datamanager.v1.SizeInfo; + + /** + * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @param message SizeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @param message SizeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ISizeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SizeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SizeInfo + * @throws {Error} If the payload is not a 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.SizeInfo; + + /** + * Decodes a SizeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SizeInfo + * @throws {Error} If the payload is 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.SizeInfo; + + /** + * Verifies a SizeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SizeInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.SizeInfo; + + /** + * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. + * @param message SizeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.SizeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SizeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SizeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetNetworkInfo. */ + interface ITargetNetworkInfo { + + /** TargetNetworkInfo eligibleForDisplay */ + eligibleForDisplay?: (boolean|null); + + /** TargetNetworkInfo eligibleForSearch */ + eligibleForSearch?: (boolean|null); + } + + /** Represents a TargetNetworkInfo. */ + class TargetNetworkInfo implements ITargetNetworkInfo { + + /** + * Constructs a new TargetNetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ITargetNetworkInfo); + + /** TargetNetworkInfo eligibleForDisplay. */ + public eligibleForDisplay: boolean; + + /** TargetNetworkInfo eligibleForSearch. */ + public eligibleForSearch?: (boolean|null); + + /** + * Creates a new TargetNetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetNetworkInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.ITargetNetworkInfo): google.ads.datamanager.v1.TargetNetworkInfo; + + /** + * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @param message TargetNetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @param message TargetNetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ITargetNetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetNetworkInfo + * @throws {Error} If the payload is not a 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.TargetNetworkInfo; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetNetworkInfo + * @throws {Error} If the payload is 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.TargetNetworkInfo; + + /** + * Verifies a TargetNetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetNetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.TargetNetworkInfo; + + /** + * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. + * @param message TargetNetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.TargetNetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetNetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetNetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestedUserListInfo. */ + interface IIngestedUserListInfo { + + /** IngestedUserListInfo uploadKeyTypes */ + uploadKeyTypes?: (google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]|null); + + /** IngestedUserListInfo contactIdInfo */ + contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); + + /** IngestedUserListInfo mobileIdInfo */ + mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); + + /** IngestedUserListInfo userIdInfo */ + userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); + + /** IngestedUserListInfo pairIdInfo */ + pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); + + /** IngestedUserListInfo pseudonymousIdInfo */ + pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); + + /** IngestedUserListInfo partnerAudienceInfo */ + partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); + } + + /** Represents an IngestedUserListInfo. */ + class IngestedUserListInfo implements IIngestedUserListInfo { + + /** + * Constructs a new IngestedUserListInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IIngestedUserListInfo); + + /** IngestedUserListInfo uploadKeyTypes. */ + public uploadKeyTypes: google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[]; + + /** IngestedUserListInfo contactIdInfo. */ + public contactIdInfo?: (google.ads.datamanager.v1.IContactIdInfo|null); + + /** IngestedUserListInfo mobileIdInfo. */ + public mobileIdInfo?: (google.ads.datamanager.v1.IMobileIdInfo|null); + + /** IngestedUserListInfo userIdInfo. */ + public userIdInfo?: (google.ads.datamanager.v1.IUserIdInfo|null); + + /** IngestedUserListInfo pairIdInfo. */ + public pairIdInfo?: (google.ads.datamanager.v1.IPairIdInfo|null); + + /** IngestedUserListInfo pseudonymousIdInfo. */ + public pseudonymousIdInfo?: (google.ads.datamanager.v1.IPseudonymousIdInfo|null); + + /** IngestedUserListInfo partnerAudienceInfo. */ + public partnerAudienceInfo?: (google.ads.datamanager.v1.IPartnerAudienceInfo|null); + + /** + * Creates a new IngestedUserListInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestedUserListInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IIngestedUserListInfo): google.ads.datamanager.v1.IngestedUserListInfo; + + /** + * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @param message IngestedUserListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @param message IngestedUserListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IIngestedUserListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestedUserListInfo + * @throws {Error} If the payload is not a 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.IngestedUserListInfo; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestedUserListInfo + * @throws {Error} If the payload is 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.IngestedUserListInfo; + + /** + * Verifies an IngestedUserListInfo message. + * @param message Plain 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 IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestedUserListInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.IngestedUserListInfo; + + /** + * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. + * @param message IngestedUserListInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.IngestedUserListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestedUserListInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestedUserListInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IngestedUserListInfo { + + /** UploadKeyType enum. */ + enum UploadKeyType { + UPLOAD_KEY_TYPE_UNSPECIFIED = 0, + CONTACT_ID = 1, + MOBILE_ID = 2, + USER_ID = 3, + PAIR_ID = 4, + PSEUDONYMOUS_ID = 5 + } + } + + /** Properties of a ContactIdInfo. */ + interface IContactIdInfo { + + /** ContactIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** ContactIdInfo matchRatePercentage */ + matchRatePercentage?: (number|null); + } + + /** Represents a ContactIdInfo. */ + class ContactIdInfo implements IContactIdInfo { + + /** + * Constructs a new ContactIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IContactIdInfo); + + /** ContactIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** ContactIdInfo matchRatePercentage. */ + public matchRatePercentage: number; + + /** + * Creates a new ContactIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IContactIdInfo): google.ads.datamanager.v1.ContactIdInfo; + + /** + * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @param message ContactIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @param message ContactIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IContactIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactIdInfo + * @throws {Error} If the payload is not a 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.ContactIdInfo; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactIdInfo + * @throws {Error} If the payload is 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.ContactIdInfo; + + /** + * Verifies a ContactIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ContactIdInfo; + + /** + * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. + * @param message ContactIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ContactIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MobileIdInfo. */ + interface IMobileIdInfo { + + /** MobileIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** MobileIdInfo keySpace */ + keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); + + /** MobileIdInfo appId */ + appId?: (string|null); + } + + /** Represents a MobileIdInfo. */ + class MobileIdInfo implements IMobileIdInfo { + + /** + * Constructs a new MobileIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IMobileIdInfo); + + /** MobileIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** MobileIdInfo keySpace. */ + public keySpace?: (google.ads.datamanager.v1.MobileIdInfo.KeySpace|keyof typeof google.ads.datamanager.v1.MobileIdInfo.KeySpace|null); + + /** MobileIdInfo appId. */ + public appId?: (string|null); + + /** + * Creates a new MobileIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns MobileIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IMobileIdInfo): google.ads.datamanager.v1.MobileIdInfo; + + /** + * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @param message MobileIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @param message MobileIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IMobileIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MobileIdInfo + * @throws {Error} If the payload is not a 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.MobileIdInfo; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MobileIdInfo + * @throws {Error} If the payload is 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.MobileIdInfo; + + /** + * Verifies a MobileIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MobileIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.MobileIdInfo; + + /** + * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. + * @param message MobileIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.MobileIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MobileIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MobileIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MobileIdInfo { + + /** KeySpace enum. */ + enum KeySpace { + KEY_SPACE_UNSPECIFIED = 0, + IOS = 1, + ANDROID = 2 + } + } + + /** Properties of a UserIdInfo. */ + interface IUserIdInfo { + + /** UserIdInfo dataSourceType */ + dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + } + + /** Represents a UserIdInfo. */ + class UserIdInfo implements IUserIdInfo { + + /** + * Constructs a new UserIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserIdInfo); + + /** UserIdInfo dataSourceType. */ + public dataSourceType?: (google.ads.datamanager.v1.DataSourceType|keyof typeof google.ads.datamanager.v1.DataSourceType|null); + + /** + * Creates a new UserIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UserIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserIdInfo): google.ads.datamanager.v1.UserIdInfo; + + /** + * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @param message UserIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @param message UserIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserIdInfo + * @throws {Error} If the payload is not a 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.UserIdInfo; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserIdInfo + * @throws {Error} If the payload is 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.UserIdInfo; + + /** + * Verifies a UserIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserIdInfo; + + /** + * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. + * @param message UserIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairIdInfo. */ + interface IPairIdInfo { + + /** PairIdInfo publisherId */ + publisherId?: (number|Long|string|null); + + /** PairIdInfo publisherName */ + publisherName?: (string|null); + + /** PairIdInfo matchRatePercentage */ + matchRatePercentage?: (number|null); + + /** PairIdInfo advertiserIdentifierCount */ + advertiserIdentifierCount?: (number|Long|string|null); + + /** PairIdInfo cleanRoomIdentifier */ + cleanRoomIdentifier?: (string|null); + } + + /** Represents a PairIdInfo. */ + class PairIdInfo implements IPairIdInfo { + + /** + * Constructs a new PairIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPairIdInfo); + + /** PairIdInfo publisherId. */ + public publisherId?: (number|Long|string|null); + + /** PairIdInfo publisherName. */ + public publisherName?: (string|null); + + /** PairIdInfo matchRatePercentage. */ + public matchRatePercentage: number; + + /** PairIdInfo advertiserIdentifierCount. */ + public advertiserIdentifierCount: (number|Long|string); + + /** PairIdInfo cleanRoomIdentifier. */ + public cleanRoomIdentifier?: (string|null); + + /** + * Creates a new PairIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PairIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPairIdInfo): google.ads.datamanager.v1.PairIdInfo; + + /** + * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @param message PairIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @param message PairIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPairIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairIdInfo + * @throws {Error} If the payload is not a 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.PairIdInfo; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairIdInfo + * @throws {Error} If the payload is 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.PairIdInfo; + + /** + * Verifies a PairIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PairIdInfo; + + /** + * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. + * @param message PairIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PairIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartnerAudienceInfo. */ + interface IPartnerAudienceInfo { + + /** PartnerAudienceInfo partnerAudienceSource */ + partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); + + /** PartnerAudienceInfo commercePartner */ + commercePartner?: (string|null); + } + + /** Represents a PartnerAudienceInfo. */ + class PartnerAudienceInfo implements IPartnerAudienceInfo { + + /** + * Constructs a new PartnerAudienceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo); + + /** PartnerAudienceInfo partnerAudienceSource. */ + public partnerAudienceSource?: (google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|keyof typeof google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null); + + /** PartnerAudienceInfo commercePartner. */ + public commercePartner?: (string|null); + + /** + * Creates a new PartnerAudienceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PartnerAudienceInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPartnerAudienceInfo): google.ads.datamanager.v1.PartnerAudienceInfo; + + /** + * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @param message PartnerAudienceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @param message PartnerAudienceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPartnerAudienceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartnerAudienceInfo + * @throws {Error} If the payload is not a 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.PartnerAudienceInfo; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartnerAudienceInfo + * @throws {Error} If the payload is 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.PartnerAudienceInfo; + + /** + * Verifies a PartnerAudienceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartnerAudienceInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PartnerAudienceInfo; + + /** + * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. + * @param message PartnerAudienceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PartnerAudienceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartnerAudienceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartnerAudienceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PartnerAudienceInfo { + + /** PartnerAudienceSource enum. */ + enum PartnerAudienceSource { + PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0, + COMMERCE_AUDIENCE = 1, + LINEAR_TV_AUDIENCE = 2, + AGENCY_PROVIDER_AUDIENCE = 3 + } + } + + /** Properties of a PseudonymousIdInfo. */ + interface IPseudonymousIdInfo { + + /** PseudonymousIdInfo syncStatus */ + syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); + + /** PseudonymousIdInfo billableRecordCount */ + billableRecordCount?: (number|Long|string|null); + } + + /** Represents a PseudonymousIdInfo. */ + class PseudonymousIdInfo implements IPseudonymousIdInfo { + + /** + * Constructs a new PseudonymousIdInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo); + + /** PseudonymousIdInfo syncStatus. */ + public syncStatus?: (google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|keyof typeof google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null); + + /** PseudonymousIdInfo billableRecordCount. */ + public billableRecordCount?: (number|Long|string|null); + + /** + * Creates a new PseudonymousIdInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PseudonymousIdInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IPseudonymousIdInfo): google.ads.datamanager.v1.PseudonymousIdInfo; + + /** + * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @param message PseudonymousIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @param message PseudonymousIdInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IPseudonymousIdInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PseudonymousIdInfo + * @throws {Error} If the payload is not a 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.PseudonymousIdInfo; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PseudonymousIdInfo + * @throws {Error} If the payload is 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.PseudonymousIdInfo; + + /** + * Verifies a PseudonymousIdInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PseudonymousIdInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.PseudonymousIdInfo; + + /** + * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. + * @param message PseudonymousIdInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.PseudonymousIdInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PseudonymousIdInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PseudonymousIdInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PseudonymousIdInfo { + + /** SyncStatus enum. */ + enum SyncStatus { + SYNC_STATUS_UNSPECIFIED = 0, + CREATED = 1, + READY_FOR_USE = 2, + FAILED = 3 + } + } + + /** DataSourceType enum. */ + enum DataSourceType { + DATA_SOURCE_TYPE_UNSPECIFIED = 0, + DATA_SOURCE_TYPE_FIRST_PARTY = 1, + DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU = 2, + DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE = 3, + DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA = 4 + } + + /** Properties of a UserListDirectLicense. */ + interface IUserListDirectLicense { + + /** UserListDirectLicense name */ + name?: (string|null); + + /** UserListDirectLicense userListId */ + userListId?: (number|Long|string|null); + + /** UserListDirectLicense userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListDirectLicense clientAccountType */ + clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListDirectLicense clientAccountId */ + clientAccountId?: (number|Long|string|null); + + /** UserListDirectLicense clientAccountDisplayName */ + clientAccountDisplayName?: (string|null); + + /** UserListDirectLicense status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListDirectLicense pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListDirectLicense historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListDirectLicense metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListDirectLicense. */ + class UserListDirectLicense implements IUserListDirectLicense { + + /** + * Constructs a new UserListDirectLicense. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListDirectLicense); + + /** UserListDirectLicense name. */ + public name: string; + + /** UserListDirectLicense userListId. */ + public userListId?: (number|Long|string|null); + + /** UserListDirectLicense userListDisplayName. */ + public userListDisplayName: string; + + /** UserListDirectLicense clientAccountType. */ + public clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListDirectLicense clientAccountId. */ + public clientAccountId?: (number|Long|string|null); + + /** UserListDirectLicense clientAccountDisplayName. */ + public clientAccountDisplayName: string; + + /** UserListDirectLicense status. */ + public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListDirectLicense pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListDirectLicense historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListDirectLicense metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListDirectLicense instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListDirectLicense instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListDirectLicense): google.ads.datamanager.v1.UserListDirectLicense; + + /** + * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @param message UserListDirectLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @param message UserListDirectLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListDirectLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListDirectLicense + * @throws {Error} If the payload is not a 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.UserListDirectLicense; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListDirectLicense + * @throws {Error} If the payload is 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.UserListDirectLicense; + + /** + * Verifies a UserListDirectLicense message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListDirectLicense + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListDirectLicense; + + /** + * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. + * @param message UserListDirectLicense + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListDirectLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListDirectLicense to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListDirectLicense + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserListLicenseClientAccountType enum. */ + enum UserListLicenseClientAccountType { + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN = 0, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS = 1, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER = 2, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER = 3, + USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK = 4 + } + + /** Properties of a UserListLicenseMetrics. */ + interface IUserListLicenseMetrics { + + /** UserListLicenseMetrics clickCount */ + clickCount?: (number|Long|string|null); + + /** UserListLicenseMetrics impressionCount */ + impressionCount?: (number|Long|string|null); + + /** UserListLicenseMetrics revenueUsdMicros */ + revenueUsdMicros?: (number|Long|string|null); + + /** UserListLicenseMetrics startDate */ + startDate?: (number|Long|string|null); + + /** UserListLicenseMetrics endDate */ + endDate?: (number|Long|string|null); + } + + /** Represents a UserListLicenseMetrics. */ + class UserListLicenseMetrics implements IUserListLicenseMetrics { + + /** + * Constructs a new UserListLicenseMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics); + + /** UserListLicenseMetrics clickCount. */ + public clickCount: (number|Long|string); + + /** UserListLicenseMetrics impressionCount. */ + public impressionCount: (number|Long|string); + + /** UserListLicenseMetrics revenueUsdMicros. */ + public revenueUsdMicros: (number|Long|string); + + /** UserListLicenseMetrics startDate. */ + public startDate: (number|Long|string); + + /** UserListLicenseMetrics endDate. */ + public endDate: (number|Long|string); + + /** + * Creates a new UserListLicenseMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListLicenseMetrics instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListLicenseMetrics): google.ads.datamanager.v1.UserListLicenseMetrics; + + /** + * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @param message UserListLicenseMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @param message UserListLicenseMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicenseMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListLicenseMetrics + * @throws {Error} If the payload is not a 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.UserListLicenseMetrics; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListLicenseMetrics + * @throws {Error} If the payload is 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.UserListLicenseMetrics; + + /** + * Verifies a UserListLicenseMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListLicenseMetrics + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicenseMetrics; + + /** + * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. + * @param message UserListLicenseMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListLicenseMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListLicenseMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListLicenseMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListLicensePricing. */ + interface IUserListLicensePricing { + + /** UserListLicensePricing pricingId */ + pricingId?: (number|Long|string|null); + + /** UserListLicensePricing costMicros */ + costMicros?: (number|Long|string|null); + + /** UserListLicensePricing currencyCode */ + currencyCode?: (string|null); + + /** UserListLicensePricing startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing pricingActive */ + pricingActive?: (boolean|null); + + /** UserListLicensePricing buyerApprovalState */ + buyerApprovalState?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null); + + /** UserListLicensePricing costType */ + costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); + + /** UserListLicensePricing maxCostMicros */ + maxCostMicros?: (number|Long|string|null); + } + + /** Represents a UserListLicensePricing. */ + class UserListLicensePricing implements IUserListLicensePricing { + + /** + * Constructs a new UserListLicensePricing. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListLicensePricing); + + /** UserListLicensePricing pricingId. */ + public pricingId: (number|Long|string); + + /** UserListLicensePricing costMicros. */ + public costMicros?: (number|Long|string|null); + + /** UserListLicensePricing currencyCode. */ + public currencyCode?: (string|null); + + /** UserListLicensePricing startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** UserListLicensePricing pricingActive. */ + public pricingActive: boolean; + + /** UserListLicensePricing buyerApprovalState. */ + public buyerApprovalState: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState); + + /** UserListLicensePricing costType. */ + public costType?: (google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|keyof typeof google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null); + + /** UserListLicensePricing maxCostMicros. */ + public maxCostMicros?: (number|Long|string|null); + + /** + * Creates a new UserListLicensePricing instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListLicensePricing instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListLicensePricing): google.ads.datamanager.v1.UserListLicensePricing; + + /** + * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @param message UserListLicensePricing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @param message UserListLicensePricing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListLicensePricing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListLicensePricing + * @throws {Error} If the payload is not a 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.UserListLicensePricing; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListLicensePricing + * @throws {Error} If the payload is 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.UserListLicensePricing; + + /** + * Verifies a UserListLicensePricing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListLicensePricing + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListLicensePricing; + + /** + * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. + * @param message UserListLicensePricing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListLicensePricing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListLicensePricing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListLicensePricing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserListLicensePricing { + + /** UserListPricingBuyerApprovalState enum. */ + enum UserListPricingBuyerApprovalState { + USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED = 0, + PENDING = 1, + APPROVED = 2, + REJECTED = 3 + } + + /** UserListPricingCostType enum. */ + enum UserListPricingCostType { + USER_LIST_PRICING_COST_TYPE_UNSPECIFIED = 0, + CPC = 1, + CPM = 2, + MEDIA_SHARE = 3 + } + } + + /** UserListLicenseStatus enum. */ + enum UserListLicenseStatus { + USER_LIST_LICENSE_STATUS_UNSPECIFIED = 0, + USER_LIST_LICENSE_STATUS_ENABLED = 1, + USER_LIST_LICENSE_STATUS_DISABLED = 2 + } + + /** Represents a UserListDirectLicenseService */ + class UserListDirectLicenseService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListDirectLicenseService 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 UserListDirectLicenseService 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): UserListDirectLicenseService; + + /** + * Calls CreateUserListDirectLicense. + * @param request CreateUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback): void; + + /** + * Calls CreateUserListDirectLicense. + * @param request CreateUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public createUserListDirectLicense(request: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): Promise; + + /** + * Calls GetUserListDirectLicense. + * @param request GetUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback): void; + + /** + * Calls GetUserListDirectLicense. + * @param request GetUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public getUserListDirectLicense(request: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): Promise; + + /** + * Calls UpdateUserListDirectLicense. + * @param request UpdateUserListDirectLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListDirectLicense + */ + public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback): void; + + /** + * Calls UpdateUserListDirectLicense. + * @param request UpdateUserListDirectLicenseRequest message or plain object + * @returns Promise + */ + public updateUserListDirectLicense(request: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): Promise; + + /** + * Calls ListUserListDirectLicenses. + * @param request ListUserListDirectLicensesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse + */ + public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, callback: google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback): void; + + /** + * Calls ListUserListDirectLicenses. + * @param request ListUserListDirectLicensesRequest message or plain object + * @returns Promise + */ + public listUserListDirectLicenses(request: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): Promise; + } + + namespace UserListDirectLicenseService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type CreateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type GetUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. + * @param error Error, if any + * @param [response] UserListDirectLicense + */ + type UpdateUserListDirectLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListDirectLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. + * @param error Error, if any + * @param [response] ListUserListDirectLicensesResponse + */ + type ListUserListDirectLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListDirectLicensesResponse) => void; + } + + /** Properties of a CreateUserListDirectLicenseRequest. */ + interface ICreateUserListDirectLicenseRequest { + + /** CreateUserListDirectLicenseRequest parent */ + parent?: (string|null); + + /** CreateUserListDirectLicenseRequest userListDirectLicense */ + userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + } + + /** Represents a CreateUserListDirectLicenseRequest. */ + class CreateUserListDirectLicenseRequest implements ICreateUserListDirectLicenseRequest { + + /** + * Constructs a new CreateUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest); + + /** CreateUserListDirectLicenseRequest parent. */ + public parent: string; + + /** CreateUserListDirectLicenseRequest userListDirectLicense. */ + public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** + * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @param message CreateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @param message CreateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.CreateUserListDirectLicenseRequest; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.CreateUserListDirectLicenseRequest; + + /** + * Verifies a CreateUserListDirectLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListDirectLicenseRequest; + + /** + * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message CreateUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserListDirectLicenseRequest. */ + interface IGetUserListDirectLicenseRequest { + + /** GetUserListDirectLicenseRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListDirectLicenseRequest. */ + class GetUserListDirectLicenseRequest implements IGetUserListDirectLicenseRequest { + + /** + * Constructs a new GetUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest); + + /** GetUserListDirectLicenseRequest name. */ + public name: string; + + /** + * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @param message GetUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @param message GetUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.GetUserListDirectLicenseRequest; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.GetUserListDirectLicenseRequest; + + /** + * Verifies a GetUserListDirectLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListDirectLicenseRequest; + + /** + * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message GetUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserListDirectLicenseRequest. */ + interface IUpdateUserListDirectLicenseRequest { + + /** UpdateUserListDirectLicenseRequest userListDirectLicense */ + userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** UpdateUserListDirectLicenseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateUserListDirectLicenseRequest. */ + class UpdateUserListDirectLicenseRequest implements IUpdateUserListDirectLicenseRequest { + + /** + * Constructs a new UpdateUserListDirectLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest); + + /** UpdateUserListDirectLicenseRequest userListDirectLicense. */ + public userListDirectLicense?: (google.ads.datamanager.v1.IUserListDirectLicense|null); + + /** UpdateUserListDirectLicenseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserListDirectLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @param message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @param message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a 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.UpdateUserListDirectLicenseRequest; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is 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.UpdateUserListDirectLicenseRequest; + + /** + * Verifies an UpdateUserListDirectLicenseRequest message. + * @param message Plain 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserListDirectLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest; + + /** + * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @param message UpdateUserListDirectLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserListDirectLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserListDirectLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListDirectLicensesRequest. */ + interface IListUserListDirectLicensesRequest { + + /** ListUserListDirectLicensesRequest parent */ + parent?: (string|null); + + /** ListUserListDirectLicensesRequest filter */ + filter?: (string|null); + + /** ListUserListDirectLicensesRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListDirectLicensesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListDirectLicensesRequest. */ + class ListUserListDirectLicensesRequest implements IListUserListDirectLicensesRequest { + + /** + * Constructs a new ListUserListDirectLicensesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest); + + /** ListUserListDirectLicensesRequest parent. */ + public parent: string; + + /** ListUserListDirectLicensesRequest filter. */ + public filter: string; + + /** ListUserListDirectLicensesRequest pageSize. */ + public pageSize: number; + + /** ListUserListDirectLicensesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListDirectLicensesRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesRequest): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @param message ListUserListDirectLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @param message ListUserListDirectLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesRequest; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListDirectLicensesRequest + * @throws {Error} If the payload is 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.ListUserListDirectLicensesRequest; + + /** + * Verifies a ListUserListDirectLicensesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListDirectLicensesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesRequest; + + /** + * Creates a plain object from a ListUserListDirectLicensesRequest message. Also converts values to other types if specified. + * @param message ListUserListDirectLicensesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListDirectLicensesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListDirectLicensesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListDirectLicensesResponse. */ + interface IListUserListDirectLicensesResponse { + + /** ListUserListDirectLicensesResponse userListDirectLicenses */ + userListDirectLicenses?: (google.ads.datamanager.v1.IUserListDirectLicense[]|null); + + /** ListUserListDirectLicensesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListDirectLicensesResponse. */ + class ListUserListDirectLicensesResponse implements IListUserListDirectLicensesResponse { + + /** + * Constructs a new ListUserListDirectLicensesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse); + + /** ListUserListDirectLicensesResponse userListDirectLicenses. */ + public userListDirectLicenses: google.ads.datamanager.v1.IUserListDirectLicense[]; + + /** ListUserListDirectLicensesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListDirectLicensesResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListDirectLicensesResponse): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @param message ListUserListDirectLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @param message ListUserListDirectLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListDirectLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a 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.ListUserListDirectLicensesResponse; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListDirectLicensesResponse + * @throws {Error} If the payload is 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.ListUserListDirectLicensesResponse; + + /** + * Verifies a ListUserListDirectLicensesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListDirectLicensesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListDirectLicensesResponse; + + /** + * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. + * @param message ListUserListDirectLicensesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListDirectLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListDirectLicensesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListDirectLicensesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListGlobalLicense. */ + interface IUserListGlobalLicense { + + /** UserListGlobalLicense name */ + name?: (string|null); + + /** UserListGlobalLicense userListId */ + userListId?: (number|Long|string|null); + + /** UserListGlobalLicense userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListGlobalLicense licenseType */ + licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicense status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicense pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicense historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListGlobalLicense metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListGlobalLicense. */ + class UserListGlobalLicense implements IUserListGlobalLicense { + + /** + * Constructs a new UserListGlobalLicense. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicense); + + /** UserListGlobalLicense name. */ + public name: string; + + /** UserListGlobalLicense userListId. */ + public userListId?: (number|Long|string|null); + + /** UserListGlobalLicense userListDisplayName. */ + public userListDisplayName: string; + + /** UserListGlobalLicense licenseType. */ + public licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicense status. */ + public status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicense pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicense historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListGlobalLicense metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListGlobalLicense instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListGlobalLicense instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicense): google.ads.datamanager.v1.UserListGlobalLicense; + + /** + * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @param message UserListGlobalLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @param message UserListGlobalLicense message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicense, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListGlobalLicense + * @throws {Error} If the payload is not a 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.UserListGlobalLicense; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListGlobalLicense + * @throws {Error} If the payload is 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.UserListGlobalLicense; + + /** + * Verifies a UserListGlobalLicense message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListGlobalLicense + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicense; + + /** + * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. + * @param message UserListGlobalLicense + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicense, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListGlobalLicense to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListGlobalLicense + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserListGlobalLicenseCustomerInfo. */ + interface IUserListGlobalLicenseCustomerInfo { + + /** UserListGlobalLicenseCustomerInfo name */ + name?: (string|null); + + /** UserListGlobalLicenseCustomerInfo userListId */ + userListId?: (number|Long|string|null); + + /** UserListGlobalLicenseCustomerInfo userListDisplayName */ + userListDisplayName?: (string|null); + + /** UserListGlobalLicenseCustomerInfo licenseType */ + licenseType?: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType|null); + + /** UserListGlobalLicenseCustomerInfo status */ + status?: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus|null); + + /** UserListGlobalLicenseCustomerInfo pricing */ + pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountType */ + clientAccountType?: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountId */ + clientAccountId?: (number|Long|string|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName */ + clientAccountDisplayName?: (string|null); + + /** UserListGlobalLicenseCustomerInfo historicalPricings */ + historicalPricings?: (google.ads.datamanager.v1.IUserListLicensePricing[]|null); + + /** UserListGlobalLicenseCustomerInfo metrics */ + metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + } + + /** Represents a UserListGlobalLicenseCustomerInfo. */ + class UserListGlobalLicenseCustomerInfo implements IUserListGlobalLicenseCustomerInfo { + + /** + * Constructs a new UserListGlobalLicenseCustomerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo); + + /** UserListGlobalLicenseCustomerInfo name. */ + public name: string; + + /** UserListGlobalLicenseCustomerInfo userListId. */ + public userListId: (number|Long|string); + + /** UserListGlobalLicenseCustomerInfo userListDisplayName. */ + public userListDisplayName: string; + + /** UserListGlobalLicenseCustomerInfo licenseType. */ + public licenseType: (google.ads.datamanager.v1.UserListGlobalLicenseType|keyof typeof google.ads.datamanager.v1.UserListGlobalLicenseType); + + /** UserListGlobalLicenseCustomerInfo status. */ + public status: (google.ads.datamanager.v1.UserListLicenseStatus|keyof typeof google.ads.datamanager.v1.UserListLicenseStatus); + + /** UserListGlobalLicenseCustomerInfo pricing. */ + public pricing?: (google.ads.datamanager.v1.IUserListLicensePricing|null); + + /** UserListGlobalLicenseCustomerInfo clientAccountType. */ + public clientAccountType: (google.ads.datamanager.v1.UserListLicenseClientAccountType|keyof typeof google.ads.datamanager.v1.UserListLicenseClientAccountType); + + /** UserListGlobalLicenseCustomerInfo clientAccountId. */ + public clientAccountId: (number|Long|string); + + /** UserListGlobalLicenseCustomerInfo clientAccountDisplayName. */ + public clientAccountDisplayName: string; + + /** UserListGlobalLicenseCustomerInfo historicalPricings. */ + public historicalPricings: google.ads.datamanager.v1.IUserListLicensePricing[]; + + /** UserListGlobalLicenseCustomerInfo metrics. */ + public metrics?: (google.ads.datamanager.v1.IUserListLicenseMetrics|null); + + /** + * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UserListGlobalLicenseCustomerInfo instance + */ + public static create(properties?: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @param message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a 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.UserListGlobalLicenseCustomerInfo; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is 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.UserListGlobalLicenseCustomerInfo; + + /** + * Verifies a UserListGlobalLicenseCustomerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserListGlobalLicenseCustomerInfo + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo; + + /** + * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. + * @param message UserListGlobalLicenseCustomerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserListGlobalLicenseCustomerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserListGlobalLicenseCustomerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** UserListGlobalLicenseType enum. */ + enum UserListGlobalLicenseType { + USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED = 0, + USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER = 1, + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE = 2, + USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE = 3 + } + + /** Represents a UserListGlobalLicenseService */ + class UserListGlobalLicenseService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListGlobalLicenseService 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 UserListGlobalLicenseService 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): UserListGlobalLicenseService; + + /** + * Calls CreateUserListGlobalLicense. + * @param request CreateUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback): void; + + /** + * Calls CreateUserListGlobalLicense. + * @param request CreateUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public createUserListGlobalLicense(request: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): Promise; + + /** + * Calls UpdateUserListGlobalLicense. + * @param request UpdateUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback): void; + + /** + * Calls UpdateUserListGlobalLicense. + * @param request UpdateUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public updateUserListGlobalLicense(request: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): Promise; + + /** + * Calls GetUserListGlobalLicense. + * @param request GetUserListGlobalLicenseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserListGlobalLicense + */ + public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback): void; + + /** + * Calls GetUserListGlobalLicense. + * @param request GetUserListGlobalLicenseRequest message or plain object + * @returns Promise + */ + public getUserListGlobalLicense(request: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): Promise; + + /** + * Calls ListUserListGlobalLicenses. + * @param request ListUserListGlobalLicensesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse + */ + public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback): void; + + /** + * Calls ListUserListGlobalLicenses. + * @param request ListUserListGlobalLicensesRequest message or plain object + * @returns Promise + */ + public listUserListGlobalLicenses(request: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): Promise; + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse + */ + public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, callback: google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback): void; + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @param request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @returns Promise + */ + public listUserListGlobalLicenseCustomerInfos(request: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): Promise; + } + + namespace UserListGlobalLicenseService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type CreateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type UpdateUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. + * @param error Error, if any + * @param [response] UserListGlobalLicense + */ + type GetUserListGlobalLicenseCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserListGlobalLicense) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. + * @param error Error, if any + * @param [response] ListUserListGlobalLicensesResponse + */ + type ListUserListGlobalLicensesCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. + * @param error Error, if any + * @param [response] ListUserListGlobalLicenseCustomerInfosResponse + */ + type ListUserListGlobalLicenseCustomerInfosCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) => void; + } + + /** Properties of a CreateUserListGlobalLicenseRequest. */ + interface ICreateUserListGlobalLicenseRequest { + + /** CreateUserListGlobalLicenseRequest parent */ + parent?: (string|null); + + /** CreateUserListGlobalLicenseRequest userListGlobalLicense */ + userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + } + + /** Represents a CreateUserListGlobalLicenseRequest. */ + class CreateUserListGlobalLicenseRequest implements ICreateUserListGlobalLicenseRequest { + + /** + * Constructs a new CreateUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest); + + /** CreateUserListGlobalLicenseRequest parent. */ + public parent: string; + + /** CreateUserListGlobalLicenseRequest userListGlobalLicense. */ + public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** + * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.CreateUserListGlobalLicenseRequest; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.CreateUserListGlobalLicenseRequest; + + /** + * Verifies a CreateUserListGlobalLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest; + + /** + * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message CreateUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserListGlobalLicenseRequest. */ + interface IUpdateUserListGlobalLicenseRequest { + + /** UpdateUserListGlobalLicenseRequest userListGlobalLicense */ + userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** UpdateUserListGlobalLicenseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateUserListGlobalLicenseRequest. */ + class UpdateUserListGlobalLicenseRequest implements IUpdateUserListGlobalLicenseRequest { + + /** + * Constructs a new UpdateUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest); + + /** UpdateUserListGlobalLicenseRequest userListGlobalLicense. */ + public userListGlobalLicense?: (google.ads.datamanager.v1.IUserListGlobalLicense|null); + + /** UpdateUserListGlobalLicenseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @param message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.UpdateUserListGlobalLicenseRequest; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.UpdateUserListGlobalLicenseRequest; + + /** + * Verifies an UpdateUserListGlobalLicenseRequest message. + * @param message Plain 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest; + + /** + * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message UpdateUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserListGlobalLicenseRequest. */ + interface IGetUserListGlobalLicenseRequest { + + /** GetUserListGlobalLicenseRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListGlobalLicenseRequest. */ + class GetUserListGlobalLicenseRequest implements IGetUserListGlobalLicenseRequest { + + /** + * Constructs a new GetUserListGlobalLicenseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest); + + /** GetUserListGlobalLicenseRequest name. */ + public name: string; + + /** + * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListGlobalLicenseRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @param message GetUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @param message GetUserListGlobalLicenseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a 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.GetUserListGlobalLicenseRequest; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is 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.GetUserListGlobalLicenseRequest; + + /** + * Verifies a GetUserListGlobalLicenseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListGlobalLicenseRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListGlobalLicenseRequest; + + /** + * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @param message GetUserListGlobalLicenseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserListGlobalLicenseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserListGlobalLicenseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicensesRequest. */ + interface IListUserListGlobalLicensesRequest { + + /** ListUserListGlobalLicensesRequest parent */ + parent?: (string|null); + + /** ListUserListGlobalLicensesRequest filter */ + filter?: (string|null); + + /** ListUserListGlobalLicensesRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListGlobalLicensesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicensesRequest. */ + class ListUserListGlobalLicensesRequest implements IListUserListGlobalLicensesRequest { + + /** + * Constructs a new ListUserListGlobalLicensesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest); + + /** ListUserListGlobalLicensesRequest parent. */ + public parent: string; + + /** ListUserListGlobalLicensesRequest filter. */ + public filter: string; + + /** ListUserListGlobalLicensesRequest pageSize. */ + public pageSize: number; + + /** ListUserListGlobalLicensesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicensesRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @param message ListUserListGlobalLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @param message ListUserListGlobalLicensesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesRequest; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is 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.ListUserListGlobalLicensesRequest; + + /** + * Verifies a ListUserListGlobalLicensesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicensesRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesRequest; + + /** + * Creates a plain object from a ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicensesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicensesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicensesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicensesResponse. */ + interface IListUserListGlobalLicensesResponse { + + /** ListUserListGlobalLicensesResponse userListGlobalLicenses */ + userListGlobalLicenses?: (google.ads.datamanager.v1.IUserListGlobalLicense[]|null); + + /** ListUserListGlobalLicensesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicensesResponse. */ + class ListUserListGlobalLicensesResponse implements IListUserListGlobalLicensesResponse { + + /** + * Constructs a new ListUserListGlobalLicensesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse); + + /** ListUserListGlobalLicensesResponse userListGlobalLicenses. */ + public userListGlobalLicenses: google.ads.datamanager.v1.IUserListGlobalLicense[]; + + /** ListUserListGlobalLicensesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicensesResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @param message ListUserListGlobalLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @param message ListUserListGlobalLicensesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicensesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicensesResponse; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is 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.ListUserListGlobalLicensesResponse; + + /** + * Verifies a ListUserListGlobalLicensesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicensesResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicensesResponse; + + /** + * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicensesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicensesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicensesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicenseCustomerInfosRequest. */ + interface IListUserListGlobalLicenseCustomerInfosRequest { + + /** ListUserListGlobalLicenseCustomerInfosRequest parent */ + parent?: (string|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest filter */ + filter?: (string|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListGlobalLicenseCustomerInfosRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicenseCustomerInfosRequest. */ + class ListUserListGlobalLicenseCustomerInfosRequest implements IListUserListGlobalLicenseCustomerInfosRequest { + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest); + + /** ListUserListGlobalLicenseCustomerInfosRequest parent. */ + public parent: string; + + /** ListUserListGlobalLicenseCustomerInfosRequest filter. */ + public filter: string; + + /** ListUserListGlobalLicenseCustomerInfosRequest pageSize. */ + public pageSize: number; + + /** ListUserListGlobalLicenseCustomerInfosRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicenseCustomerInfosRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicenseCustomerInfosRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicenseCustomerInfosRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListGlobalLicenseCustomerInfosResponse. */ + interface IListUserListGlobalLicenseCustomerInfosResponse { + + /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos */ + userListGlobalLicenseCustomerInfos?: (google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]|null); + + /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListGlobalLicenseCustomerInfosResponse. */ + class ListUserListGlobalLicenseCustomerInfosResponse implements IListUserListGlobalLicenseCustomerInfosResponse { + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse); + + /** ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. */ + public userListGlobalLicenseCustomerInfos: google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo[]; + + /** ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListGlobalLicenseCustomerInfosResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @param message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a 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.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is 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.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListGlobalLicenseCustomerInfosResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. + * @param message ListUserListGlobalLicenseCustomerInfosResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a UserListService */ + class UserListService extends $protobuf.rpc.Service { + + /** + * Constructs a new UserListService 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 UserListService 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): UserListService; + + /** + * Calls GetUserList. + * @param request GetUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest, callback: google.ads.datamanager.v1.UserListService.GetUserListCallback): void; + + /** + * Calls GetUserList. + * @param request GetUserListRequest message or plain object + * @returns Promise + */ + public getUserList(request: google.ads.datamanager.v1.IGetUserListRequest): Promise; + + /** + * Calls ListUserLists. + * @param request ListUserListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserListsResponse + */ + public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest, callback: google.ads.datamanager.v1.UserListService.ListUserListsCallback): void; + + /** + * Calls ListUserLists. + * @param request ListUserListsRequest message or plain object + * @returns Promise + */ + public listUserLists(request: google.ads.datamanager.v1.IListUserListsRequest): Promise; + + /** + * Calls CreateUserList. + * @param request CreateUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest, callback: google.ads.datamanager.v1.UserListService.CreateUserListCallback): void; + + /** + * Calls CreateUserList. + * @param request CreateUserListRequest message or plain object + * @returns Promise + */ + public createUserList(request: google.ads.datamanager.v1.ICreateUserListRequest): Promise; + + /** + * Calls UpdateUserList. + * @param request UpdateUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserList + */ + public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest, callback: google.ads.datamanager.v1.UserListService.UpdateUserListCallback): void; + + /** + * Calls UpdateUserList. + * @param request UpdateUserListRequest message or plain object + * @returns Promise + */ + public updateUserList(request: google.ads.datamanager.v1.IUpdateUserListRequest): Promise; + + /** + * Calls DeleteUserList. + * @param request DeleteUserListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest, callback: google.ads.datamanager.v1.UserListService.DeleteUserListCallback): void; + + /** + * Calls DeleteUserList. + * @param request DeleteUserListRequest message or plain object + * @returns Promise + */ + public deleteUserList(request: google.ads.datamanager.v1.IDeleteUserListRequest): Promise; + } + + namespace UserListService { + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type GetUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. + * @param error Error, if any + * @param [response] ListUserListsResponse + */ + type ListUserListsCallback = (error: (Error|null), response?: google.ads.datamanager.v1.ListUserListsResponse) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type CreateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. + * @param error Error, if any + * @param [response] UserList + */ + type UpdateUserListCallback = (error: (Error|null), response?: google.ads.datamanager.v1.UserList) => void; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserListCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a GetUserListRequest. */ + interface IGetUserListRequest { + + /** GetUserListRequest name */ + name?: (string|null); + } + + /** Represents a GetUserListRequest. */ + class GetUserListRequest implements IGetUserListRequest { + + /** + * Constructs a new GetUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IGetUserListRequest); + + /** GetUserListRequest name. */ + public name: string; + + /** + * Creates a new GetUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.IGetUserListRequest): google.ads.datamanager.v1.GetUserListRequest; + + /** + * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @param message GetUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @param message GetUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IGetUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserListRequest + * @throws {Error} If the payload is not a 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.GetUserListRequest; + + /** + * Decodes a GetUserListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserListRequest + * @throws {Error} If the payload is 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.GetUserListRequest; + + /** + * Verifies a GetUserListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserListRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.GetUserListRequest; + + /** + * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. + * @param message GetUserListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.GetUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ErrorInfo to JSON. + * Converts this GetUserListRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ErrorInfo + * Gets the default type url for GetUserListRequest * @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 { + /** Properties of a ListUserListsRequest. */ + interface IListUserListsRequest { - /** ErrorCount recordCount */ - recordCount?: (number|Long|string|null); + /** ListUserListsRequest parent */ + parent?: (string|null); - /** ErrorCount reason */ - reason?: (google.ads.datamanager.v1.ProcessingErrorReason|keyof typeof google.ads.datamanager.v1.ProcessingErrorReason|null); + /** ListUserListsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserListsRequest pageToken */ + pageToken?: (string|null); + + /** ListUserListsRequest filter */ + filter?: (string|null); } - /** Represents an ErrorCount. */ - class ErrorCount implements IErrorCount { + /** Represents a ListUserListsRequest. */ + class ListUserListsRequest implements IListUserListsRequest { /** - * Constructs a new ErrorCount. + * Constructs a new ListUserListsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.datamanager.v1.IErrorCount); + constructor(properties?: google.ads.datamanager.v1.IListUserListsRequest); - /** ErrorCount recordCount. */ - public recordCount: (number|Long|string); + /** ListUserListsRequest parent. */ + public parent: string; - /** ErrorCount reason. */ - public reason: (google.ads.datamanager.v1.ProcessingErrorReason|keyof typeof google.ads.datamanager.v1.ProcessingErrorReason); + /** ListUserListsRequest pageSize. */ + public pageSize: number; + + /** ListUserListsRequest pageToken. */ + public pageToken: string; + + /** ListUserListsRequest filter. */ + public filter: string; /** - * Creates a new ErrorCount instance using the specified properties. + * Creates a new ListUserListsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ErrorCount instance + * @returns ListUserListsRequest instance */ - public static create(properties?: google.ads.datamanager.v1.IErrorCount): google.ads.datamanager.v1.ErrorCount; + public static create(properties?: google.ads.datamanager.v1.IListUserListsRequest): google.ads.datamanager.v1.ListUserListsRequest; /** - * 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 + * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @param message ListUserListsRequest 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; + public static encode(message: google.ads.datamanager.v1.IListUserListsRequest, 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 + * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. + * @param message ListUserListsRequest 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; + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ErrorCount message from the specified reader or buffer. + * Decodes a ListUserListsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ErrorCount + * @returns ListUserListsRequest + * @throws {Error} If the payload is not a 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.ListUserListsRequest; + + /** + * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListsRequest + * @throws {Error} If the payload is 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.ListUserListsRequest; + + /** + * Verifies a ListUserListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsRequest; + + /** + * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. + * @param message ListUserListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserListsResponse. */ + interface IListUserListsResponse { + + /** ListUserListsResponse userLists */ + userLists?: (google.ads.datamanager.v1.IUserList[]|null); + + /** ListUserListsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserListsResponse. */ + class ListUserListsResponse implements IListUserListsResponse { + + /** + * Constructs a new ListUserListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.IListUserListsResponse); + + /** ListUserListsResponse userLists. */ + public userLists: google.ads.datamanager.v1.IUserList[]; + + /** ListUserListsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserListsResponse instance + */ + public static create(properties?: google.ads.datamanager.v1.IListUserListsResponse): google.ads.datamanager.v1.ListUserListsResponse; + + /** + * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @param message ListUserListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @param message ListUserListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.IListUserListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserListsResponse + * @throws {Error} If the payload is not a 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.ListUserListsResponse; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserListsResponse + * @throws {Error} If the payload is 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.ListUserListsResponse; + + /** + * Verifies a ListUserListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ListUserListsResponse; + + /** + * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. + * @param message ListUserListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ads.datamanager.v1.ListUserListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserListRequest. */ + interface ICreateUserListRequest { + + /** CreateUserListRequest parent */ + parent?: (string|null); + + /** CreateUserListRequest userList */ + userList?: (google.ads.datamanager.v1.IUserList|null); + + /** CreateUserListRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateUserListRequest. */ + class CreateUserListRequest implements ICreateUserListRequest { + + /** + * Constructs a new CreateUserListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ads.datamanager.v1.ICreateUserListRequest); + + /** CreateUserListRequest parent. */ + public parent: string; + + /** CreateUserListRequest userList. */ + public userList?: (google.ads.datamanager.v1.IUserList|null); + + /** CreateUserListRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateUserListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserListRequest instance + */ + public static create(properties?: google.ads.datamanager.v1.ICreateUserListRequest): google.ads.datamanager.v1.CreateUserListRequest; + + /** + * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @param message CreateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. + * @param message CreateUserListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ads.datamanager.v1.ICreateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserListRequest * @throws {Error} If the payload is not a 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.datamanager.v1.CreateUserListRequest; /** - * Decodes an ErrorCount message from the specified reader or buffer, length delimited. + * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ErrorCount + * @returns CreateUserListRequest * @throws {Error} If the payload is 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.datamanager.v1.CreateUserListRequest; /** - * Verifies an ErrorCount message. + * Verifies a CreateUserListRequest message. * @param message Plain 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. + * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ErrorCount + * @returns CreateUserListRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.ErrorCount; + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.CreateUserListRequest; /** - * Creates a plain object from an ErrorCount message. Also converts values to other types if specified. - * @param message ErrorCount + * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. + * @param message CreateUserListRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.datamanager.v1.ErrorCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.datamanager.v1.CreateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ErrorCount to JSON. + * Converts this CreateUserListRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ErrorCount + * Gets the default type url for CreateUserListRequest * @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 { + /** Properties of an UpdateUserListRequest. */ + interface IUpdateUserListRequest { - /** WarningInfo warningCounts */ - warningCounts?: (google.ads.datamanager.v1.IWarningCount[]|null); + /** UpdateUserListRequest userList */ + userList?: (google.ads.datamanager.v1.IUserList|null); + + /** UpdateUserListRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUserListRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a WarningInfo. */ - class WarningInfo implements IWarningInfo { + /** Represents an UpdateUserListRequest. */ + class UpdateUserListRequest implements IUpdateUserListRequest { /** - * Constructs a new WarningInfo. + * Constructs a new UpdateUserListRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.datamanager.v1.IWarningInfo); + constructor(properties?: google.ads.datamanager.v1.IUpdateUserListRequest); - /** WarningInfo warningCounts. */ - public warningCounts: google.ads.datamanager.v1.IWarningCount[]; + /** UpdateUserListRequest userList. */ + public userList?: (google.ads.datamanager.v1.IUserList|null); + + /** UpdateUserListRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUserListRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new WarningInfo instance using the specified properties. + * Creates a new UpdateUserListRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WarningInfo instance + * @returns UpdateUserListRequest instance */ - public static create(properties?: google.ads.datamanager.v1.IWarningInfo): google.ads.datamanager.v1.WarningInfo; + public static create(properties?: google.ads.datamanager.v1.IUpdateUserListRequest): google.ads.datamanager.v1.UpdateUserListRequest; /** - * 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 + * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @param message UpdateUserListRequest 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; + public static encode(message: google.ads.datamanager.v1.IUpdateUserListRequest, 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 + * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. + * @param message UpdateUserListRequest 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; + public static encodeDelimited(message: google.ads.datamanager.v1.IUpdateUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WarningInfo message from the specified reader or buffer. + * Decodes an UpdateUserListRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WarningInfo + * @returns UpdateUserListRequest * @throws {Error} If the payload is not a 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.datamanager.v1.UpdateUserListRequest; /** - * Decodes a WarningInfo message from the specified reader or buffer, length delimited. + * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WarningInfo + * @returns UpdateUserListRequest * @throws {Error} If the payload is 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.datamanager.v1.UpdateUserListRequest; /** - * Verifies a WarningInfo message. + * Verifies an UpdateUserListRequest message. * @param message Plain object 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. + * Creates an UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WarningInfo + * @returns UpdateUserListRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.WarningInfo; + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.UpdateUserListRequest; /** - * Creates a plain object from a WarningInfo message. Also converts values to other types if specified. - * @param message WarningInfo + * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. + * @param message UpdateUserListRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.datamanager.v1.WarningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.datamanager.v1.UpdateUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WarningInfo to JSON. + * Converts this UpdateUserListRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for WarningInfo + * Gets the default type url for UpdateUserListRequest * @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 { + /** Properties of a DeleteUserListRequest. */ + interface IDeleteUserListRequest { - /** WarningCount recordCount */ - recordCount?: (number|Long|string|null); + /** DeleteUserListRequest name */ + name?: (string|null); - /** WarningCount reason */ - reason?: (google.ads.datamanager.v1.ProcessingWarningReason|keyof typeof google.ads.datamanager.v1.ProcessingWarningReason|null); + /** DeleteUserListRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a WarningCount. */ - class WarningCount implements IWarningCount { + /** Represents a DeleteUserListRequest. */ + class DeleteUserListRequest implements IDeleteUserListRequest { /** - * Constructs a new WarningCount. + * Constructs a new DeleteUserListRequest. * @param [properties] Properties to set */ - constructor(properties?: google.ads.datamanager.v1.IWarningCount); + constructor(properties?: google.ads.datamanager.v1.IDeleteUserListRequest); - /** WarningCount recordCount. */ - public recordCount: (number|Long|string); + /** DeleteUserListRequest name. */ + public name: string; - /** WarningCount reason. */ - public reason: (google.ads.datamanager.v1.ProcessingWarningReason|keyof typeof google.ads.datamanager.v1.ProcessingWarningReason); + /** DeleteUserListRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new WarningCount instance using the specified properties. + * Creates a new DeleteUserListRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WarningCount instance + * @returns DeleteUserListRequest instance */ - public static create(properties?: google.ads.datamanager.v1.IWarningCount): google.ads.datamanager.v1.WarningCount; + public static create(properties?: google.ads.datamanager.v1.IDeleteUserListRequest): google.ads.datamanager.v1.DeleteUserListRequest; /** - * 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 + * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @param message DeleteUserListRequest 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; + public static encode(message: google.ads.datamanager.v1.IDeleteUserListRequest, 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 + * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. + * @param message DeleteUserListRequest 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; + public static encodeDelimited(message: google.ads.datamanager.v1.IDeleteUserListRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WarningCount message from the specified reader or buffer. + * Decodes a DeleteUserListRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WarningCount + * @returns DeleteUserListRequest * @throws {Error} If the payload is not a 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.datamanager.v1.DeleteUserListRequest; /** - * Decodes a WarningCount message from the specified reader or buffer, length delimited. + * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WarningCount + * @returns DeleteUserListRequest * @throws {Error} If the payload is 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.datamanager.v1.DeleteUserListRequest; /** - * Verifies a WarningCount message. + * Verifies a DeleteUserListRequest message. * @param message Plain object 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. + * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WarningCount + * @returns DeleteUserListRequest */ - public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.WarningCount; + public static fromObject(object: { [k: string]: any }): google.ads.datamanager.v1.DeleteUserListRequest; /** - * Creates a plain object from a WarningCount message. Also converts values to other types if specified. - * @param message WarningCount + * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. + * @param message DeleteUserListRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.ads.datamanager.v1.WarningCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.ads.datamanager.v1.DeleteUserListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WarningCount to JSON. + * Converts this DeleteUserListRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for WarningCount + * Gets the default type url for DeleteUserListRequest * @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_AWS_AUTH_FAILED = 27, - PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR = 25, - PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER = 26 - } + /** Namespace api. */ + namespace api { - /** 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, - PROCESSING_WARNING_REASON_AWS_AUTH_FAILED = 9 - } + /** 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 TermsOfService. */ - interface ITermsOfService { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** TermsOfService customerMatchTermsOfServiceStatus */ - customerMatchTermsOfServiceStatus?: (google.ads.datamanager.v1.TermsOfServiceStatus|keyof typeof google.ads.datamanager.v1.TermsOfServiceStatus|null); - } + /** ResourceDescriptor type */ + type?: (string|null); - /** Represents a TermsOfService. */ - class TermsOfService implements ITermsOfService { + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** - * Constructs a new TermsOfService. - * @param [properties] Properties to set - */ - constructor(properties?: google.ads.datamanager.v1.ITermsOfService); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** TermsOfService customerMatchTermsOfServiceStatus. */ - public customerMatchTermsOfServiceStatus: (google.ads.datamanager.v1.TermsOfServiceStatus|keyof typeof google.ads.datamanager.v1.TermsOfServiceStatus); + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** - * 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; + /** 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); - /** - * 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; + /** ResourceReference type. */ + public type: string; - /** - * 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; + /** ResourceReference childType. */ + public childType: string; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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; - /** - * Converts this TermsOfService to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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); - /** - * 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; - } + /** + * 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; - /** TermsOfServiceStatus enum. */ - enum TermsOfServiceStatus { - TERMS_OF_SERVICE_STATUS_UNSPECIFIED = 0, - ACCEPTED = 1, - REJECTED = 2 - } - } - } - } + /** + * 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 }; - /** Namespace api. */ - namespace api { + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** 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 + /** + * 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; } /** Properties of a Http. */ @@ -9103,6 +15634,9 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ @@ -9288,6 +15822,9 @@ export namespace google { /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } /** Represents a MessageOptions. */ @@ -9442,6 +15979,9 @@ export namespace google { /** 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. */ @@ -11583,5 +18123,193 @@ export namespace google { */ 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 FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } diff --git a/packages/google-ads-datamanager/protos/protos.js b/packages/google-ads-datamanager/protos/protos.js index e5e9838bf9c..0dfae3dfbd5 100644 --- a/packages/google-ads-datamanager/protos/protos.js +++ b/packages/google-ads-datamanager/protos/protos.js @@ -66,6 +66,32 @@ */ var v1 = {}; + /** + * AgeRange enum. + * @name google.ads.datamanager.v1.AgeRange + * @enum {number} + * @property {number} AGE_RANGE_UNSPECIFIED=0 AGE_RANGE_UNSPECIFIED value + * @property {number} AGE_RANGE_UNKNOWN=1 AGE_RANGE_UNKNOWN value + * @property {number} AGE_RANGE_18_24=2 AGE_RANGE_18_24 value + * @property {number} AGE_RANGE_25_34=3 AGE_RANGE_25_34 value + * @property {number} AGE_RANGE_35_44=4 AGE_RANGE_35_44 value + * @property {number} AGE_RANGE_45_54=5 AGE_RANGE_45_54 value + * @property {number} AGE_RANGE_55_64=6 AGE_RANGE_55_64 value + * @property {number} AGE_RANGE_65_UP=7 AGE_RANGE_65_UP value + */ + v1.AgeRange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGE_RANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGE_RANGE_UNKNOWN"] = 1; + values[valuesById[2] = "AGE_RANGE_18_24"] = 2; + values[valuesById[3] = "AGE_RANGE_25_34"] = 3; + values[valuesById[4] = "AGE_RANGE_35_44"] = 4; + values[valuesById[5] = "AGE_RANGE_45_54"] = 5; + values[valuesById[6] = "AGE_RANGE_55_64"] = 6; + values[valuesById[7] = "AGE_RANGE_65_UP"] = 7; + return values; + })(); + v1.AudienceMember = (function() { /** @@ -76,6 +102,8 @@ * @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.IUserIdData|null} [userIdData] AudienceMember userIdData + * @property {google.ads.datamanager.v1.IPpidData|null} [ppidData] AudienceMember ppidData * @property {google.ads.datamanager.v1.IConsent|null} [consent] AudienceMember consent */ @@ -127,6 +155,22 @@ */ AudienceMember.prototype.mobileData = null; + /** + * AudienceMember userIdData. + * @member {google.ads.datamanager.v1.IUserIdData|null|undefined} userIdData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.userIdData = null; + + /** + * AudienceMember ppidData. + * @member {google.ads.datamanager.v1.IPpidData|null|undefined} ppidData + * @memberof google.ads.datamanager.v1.AudienceMember + * @instance + */ + AudienceMember.prototype.ppidData = null; + /** * AudienceMember consent. * @member {google.ads.datamanager.v1.IConsent|null|undefined} consent @@ -140,12 +184,12 @@ /** * AudienceMember data. - * @member {"userData"|"pairData"|"mobileData"|undefined} data + * @member {"userData"|"pairData"|"mobileData"|"userIdData"|"ppidData"|undefined} data * @memberof google.ads.datamanager.v1.AudienceMember * @instance */ Object.defineProperty(AudienceMember.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["userData", "pairData", "mobileData"]), + get: $util.oneOfGetter($oneOfFields = ["userData", "pairData", "mobileData", "userIdData", "ppidData"]), set: $util.oneOfSetter($oneOfFields) }); @@ -184,6 +228,10 @@ $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(); + if (message.userIdData != null && Object.hasOwnProperty.call(message, "userIdData")) + $root.google.ads.datamanager.v1.UserIdData.encode(message.userIdData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.ppidData != null && Object.hasOwnProperty.call(message, "ppidData")) + $root.google.ads.datamanager.v1.PpidData.encode(message.ppidData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -238,6 +286,14 @@ message.mobileData = $root.google.ads.datamanager.v1.MobileData.decode(reader, reader.uint32()); break; } + case 6: { + message.userIdData = $root.google.ads.datamanager.v1.UserIdData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.ppidData = $root.google.ads.datamanager.v1.PpidData.decode(reader, reader.uint32()); + break; + } case 3: { message.consent = $root.google.ads.datamanager.v1.Consent.decode(reader, reader.uint32()); break; @@ -313,6 +369,26 @@ return "mobileData." + error; } } + if (message.userIdData != null && message.hasOwnProperty("userIdData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.UserIdData.verify(message.userIdData); + if (error) + return "userIdData." + error; + } + } + if (message.ppidData != null && message.hasOwnProperty("ppidData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.ads.datamanager.v1.PpidData.verify(message.ppidData); + if (error) + return "ppidData." + error; + } + } if (message.consent != null && message.hasOwnProperty("consent")) { var error = $root.google.ads.datamanager.v1.Consent.verify(message.consent); if (error) @@ -355,6 +431,16 @@ throw TypeError(".google.ads.datamanager.v1.AudienceMember.mobileData: object expected"); message.mobileData = $root.google.ads.datamanager.v1.MobileData.fromObject(object.mobileData); } + if (object.userIdData != null) { + if (typeof object.userIdData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.userIdData: object expected"); + message.userIdData = $root.google.ads.datamanager.v1.UserIdData.fromObject(object.userIdData); + } + if (object.ppidData != null) { + if (typeof object.ppidData !== "object") + throw TypeError(".google.ads.datamanager.v1.AudienceMember.ppidData: object expected"); + message.ppidData = $root.google.ads.datamanager.v1.PpidData.fromObject(object.ppidData); + } if (object.consent != null) { if (typeof object.consent !== "object") throw TypeError(".google.ads.datamanager.v1.AudienceMember.consent: object expected"); @@ -402,6 +488,16 @@ if (options.oneofs) object.data = "mobileData"; } + if (message.userIdData != null && message.hasOwnProperty("userIdData")) { + object.userIdData = $root.google.ads.datamanager.v1.UserIdData.toObject(message.userIdData, options); + if (options.oneofs) + object.data = "userIdData"; + } + if (message.ppidData != null && message.hasOwnProperty("ppidData")) { + object.ppidData = $root.google.ads.datamanager.v1.PpidData.toObject(message.ppidData, options); + if (options.oneofs) + object.data = "ppidData"; + } return object; }; @@ -876,6 +972,432 @@ return MobileData; })(); + v1.UserIdData = (function() { + + /** + * Properties of a UserIdData. + * @memberof google.ads.datamanager.v1 + * @interface IUserIdData + * @property {string|null} [userId] UserIdData userId + */ + + /** + * Constructs a new UserIdData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserIdData. + * @implements IUserIdData + * @constructor + * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set + */ + function UserIdData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserIdData userId. + * @member {string} userId + * @memberof google.ads.datamanager.v1.UserIdData + * @instance + */ + UserIdData.prototype.userId = ""; + + /** + * Creates a new UserIdData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData instance + */ + UserIdData.create = function create(properties) { + return new UserIdData(properties); + }; + + /** + * Encodes the specified UserIdData message. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); + return writer; + }; + + /** + * Encodes the specified UserIdData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.IUserIdData} message UserIdData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserIdData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserIdData + * @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.UserIdData} UserIdData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdData.decode = function decode(reader, 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.UserIdData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserIdData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserIdData message. + * @function verify + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserIdData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + return null; + }; + + /** + * Creates a UserIdData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserIdData} UserIdData + */ + UserIdData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserIdData) + return object; + var message = new $root.google.ads.datamanager.v1.UserIdData(); + if (object.userId != null) + message.userId = String(object.userId); + return message; + }; + + /** + * Creates a plain object from a UserIdData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {google.ads.datamanager.v1.UserIdData} message UserIdData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserIdData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userId = ""; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + return object; + }; + + /** + * Converts this UserIdData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserIdData + * @instance + * @returns {Object.} JSON object + */ + UserIdData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserIdData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserIdData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserIdData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdData"; + }; + + return UserIdData; + })(); + + v1.PpidData = (function() { + + /** + * Properties of a PpidData. + * @memberof google.ads.datamanager.v1 + * @interface IPpidData + * @property {Array.|null} [ppids] PpidData ppids + */ + + /** + * Constructs a new PpidData. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PpidData. + * @implements IPpidData + * @constructor + * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set + */ + function PpidData(properties) { + this.ppids = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PpidData ppids. + * @member {Array.} ppids + * @memberof google.ads.datamanager.v1.PpidData + * @instance + */ + PpidData.prototype.ppids = $util.emptyArray; + + /** + * Creates a new PpidData instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PpidData} PpidData instance + */ + PpidData.create = function create(properties) { + return new PpidData(properties); + }; + + /** + * Encodes the specified PpidData message. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PpidData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ppids != null && message.ppids.length) + for (var i = 0; i < message.ppids.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ppids[i]); + return writer; + }; + + /** + * Encodes the specified PpidData message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PpidData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.IPpidData} message PpidData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PpidData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PpidData message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PpidData + * @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.PpidData} PpidData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PpidData.decode = function decode(reader, 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.PpidData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.ppids && message.ppids.length)) + message.ppids = []; + message.ppids.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PpidData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PpidData} PpidData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PpidData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PpidData message. + * @function verify + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PpidData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ppids != null && message.hasOwnProperty("ppids")) { + if (!Array.isArray(message.ppids)) + return "ppids: array expected"; + for (var i = 0; i < message.ppids.length; ++i) + if (!$util.isString(message.ppids[i])) + return "ppids: string[] expected"; + } + return null; + }; + + /** + * Creates a PpidData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PpidData} PpidData + */ + PpidData.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PpidData) + return object; + var message = new $root.google.ads.datamanager.v1.PpidData(); + if (object.ppids) { + if (!Array.isArray(object.ppids)) + throw TypeError(".google.ads.datamanager.v1.PpidData.ppids: array expected"); + message.ppids = []; + for (var i = 0; i < object.ppids.length; ++i) + message.ppids[i] = String(object.ppids[i]); + } + return message; + }; + + /** + * Creates a plain object from a PpidData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {google.ads.datamanager.v1.PpidData} message PpidData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PpidData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ppids = []; + if (message.ppids && message.ppids.length) { + object.ppids = []; + for (var j = 0; j < message.ppids.length; ++j) + object.ppids[j] = message.ppids[j]; + } + return object; + }; + + /** + * Converts this PpidData to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PpidData + * @instance + * @returns {Object.} JSON object + */ + PpidData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PpidData + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PpidData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PpidData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PpidData"; + }; + + return PpidData; + })(); + v1.Consent = (function() { /** @@ -3340,6 +3862,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -3418,6 +3941,10 @@ case 5: message.accountType = 5; break; + case "GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 6: + message.accountType = 6; + break; } return message; }; @@ -3485,6 +4012,7 @@ * @property {number} DISPLAY_VIDEO_ADVERTISER=3 DISPLAY_VIDEO_ADVERTISER value * @property {number} DATA_PARTNER=4 DATA_PARTNER value * @property {number} GOOGLE_ANALYTICS_PROPERTY=5 GOOGLE_ANALYTICS_PROPERTY value + * @property {number} GOOGLE_AD_MANAGER_AUDIENCE_LINK=6 GOOGLE_AD_MANAGER_AUDIENCE_LINK value */ ProductAccount.AccountType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -3494,6 +4022,7 @@ values[valuesById[3] = "DISPLAY_VIDEO_ADVERTISER"] = 3; values[valuesById[4] = "DATA_PARTNER"] = 4; values[valuesById[5] = "GOOGLE_ANALYTICS_PROPERTY"] = 5; + values[valuesById[6] = "GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 6; return values; })(); @@ -4685,6 +5214,53 @@ * @property {number} MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT=49 MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT value * @property {number} FIELD_VALUE_TOO_LONG=50 FIELD_VALUE_TOO_LONG value * @property {number} TOO_MANY_ELEMENTS=51 TOO_MANY_ELEMENTS value + * @property {number} ALREADY_EXISTS=52 ALREADY_EXISTS value + * @property {number} IMMUTABLE_FIELD_FOR_UPDATE=53 IMMUTABLE_FIELD_FOR_UPDATE value + * @property {number} INVALID_RESOURCE_NAME=54 INVALID_RESOURCE_NAME value + * @property {number} INVALID_FILTER=55 INVALID_FILTER value + * @property {number} INVALID_UPDATE_MASK=56 INVALID_UPDATE_MASK value + * @property {number} INVALID_PAGE_TOKEN=57 INVALID_PAGE_TOKEN value + * @property {number} CANNOT_UPDATE_DISABLED_LICENSE=58 CANNOT_UPDATE_DISABLED_LICENSE value + * @property {number} CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST=59 CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST value + * @property {number} INSUFFICIENT_COST=60 INSUFFICIENT_COST value + * @property {number} CANNOT_DISABLE_LICENSE=61 CANNOT_DISABLE_LICENSE value + * @property {number} INVALID_CLIENT_ACCOUNT_ID=62 INVALID_CLIENT_ACCOUNT_ID value + * @property {number} PRICING_ONLY_ZERO_COST_ALLOWED=63 PRICING_ONLY_ZERO_COST_ALLOWED value + * @property {number} PRICE_TOO_HIGH=64 PRICE_TOO_HIGH value + * @property {number} CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE=65 CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE value + * @property {number} INVALID_PRICING_END_DATE=66 INVALID_PRICING_END_DATE value + * @property {number} CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT=67 CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT value + * @property {number} MISMATCHED_ACCOUNT_TYPE=68 MISMATCHED_ACCOUNT_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE=69 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER=70 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER value + * @property {number} INVALID_MEDIA_SHARE_COST=71 INVALID_MEDIA_SHARE_COST value + * @property {number} INVALID_COST_TYPE=72 INVALID_COST_TYPE value + * @property {number} MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST=73 MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST value + * @property {number} MAX_COST_NOT_ALLOWED=74 MAX_COST_NOT_ALLOWED value + * @property {number} COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED=75 COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED value + * @property {number} INVALID_DESCRIPTION=76 INVALID_DESCRIPTION value + * @property {number} INVALID_DISPLAY_NAME=77 INVALID_DISPLAY_NAME value + * @property {number} DISPLAY_NAME_ALREADY_USED=78 DISPLAY_NAME_ALREADY_USED value + * @property {number} OWNERSHIP_REQUIRED_FOR_UPDATE=79 OWNERSHIP_REQUIRED_FOR_UPDATE value + * @property {number} USER_LIST_MUTATION_NOT_SUPPORTED=80 USER_LIST_MUTATION_NOT_SUPPORTED value + * @property {number} SENSITIVE_USER_LIST_IMMUTABLE=81 SENSITIVE_USER_LIST_IMMUTABLE value + * @property {number} BILLABLE_RECORD_COUNT_IMMUTABLE=82 BILLABLE_RECORD_COUNT_IMMUTABLE value + * @property {number} USER_LIST_NAME_RESERVED=83 USER_LIST_NAME_RESERVED value + * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA=84 ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA value + * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_SOURCE=85 UNSUPPORTED_PARTNER_AUDIENCE_SOURCE value + * @property {number} COMMERCE_PARTNER_NOT_ALLOWED=86 COMMERCE_PARTNER_NOT_ALLOWED value + * @property {number} UNSUPPORTED_PARTNER_AUDIENCE_INFO=87 UNSUPPORTED_PARTNER_AUDIENCE_INFO value + * @property {number} PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED=88 PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED value + * @property {number} DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=89 DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value + * @property {number} ADVERTISER_TOS_NOT_ACCEPTED=90 ADVERTISER_TOS_NOT_ACCEPTED value + * @property {number} ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA=91 ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA value + * @property {number} USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT=92 USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT value + * @property {number} INVALID_COMMERCE_PARTNER=93 INVALID_COMMERCE_PARTNER value + * @property {number} CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE=94 CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE value + * @property {number} UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES=95 UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES value + * @property {number} UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG=96 UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG value + * @property {number} UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE=97 UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE value + * @property {number} UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK=98 UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK value */ v1.ErrorReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4740,6 +5316,53 @@ values[valuesById[49] = "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT"] = 49; values[valuesById[50] = "FIELD_VALUE_TOO_LONG"] = 50; values[valuesById[51] = "TOO_MANY_ELEMENTS"] = 51; + values[valuesById[52] = "ALREADY_EXISTS"] = 52; + values[valuesById[53] = "IMMUTABLE_FIELD_FOR_UPDATE"] = 53; + values[valuesById[54] = "INVALID_RESOURCE_NAME"] = 54; + values[valuesById[55] = "INVALID_FILTER"] = 55; + values[valuesById[56] = "INVALID_UPDATE_MASK"] = 56; + values[valuesById[57] = "INVALID_PAGE_TOKEN"] = 57; + values[valuesById[58] = "CANNOT_UPDATE_DISABLED_LICENSE"] = 58; + values[valuesById[59] = "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST"] = 59; + values[valuesById[60] = "INSUFFICIENT_COST"] = 60; + values[valuesById[61] = "CANNOT_DISABLE_LICENSE"] = 61; + values[valuesById[62] = "INVALID_CLIENT_ACCOUNT_ID"] = 62; + values[valuesById[63] = "PRICING_ONLY_ZERO_COST_ALLOWED"] = 63; + values[valuesById[64] = "PRICE_TOO_HIGH"] = 64; + values[valuesById[65] = "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE"] = 65; + values[valuesById[66] = "INVALID_PRICING_END_DATE"] = 66; + values[valuesById[67] = "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT"] = 67; + values[valuesById[68] = "MISMATCHED_ACCOUNT_TYPE"] = 68; + values[valuesById[69] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE"] = 69; + values[valuesById[70] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER"] = 70; + values[valuesById[71] = "INVALID_MEDIA_SHARE_COST"] = 71; + values[valuesById[72] = "INVALID_COST_TYPE"] = 72; + values[valuesById[73] = "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST"] = 73; + values[valuesById[74] = "MAX_COST_NOT_ALLOWED"] = 74; + values[valuesById[75] = "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED"] = 75; + values[valuesById[76] = "INVALID_DESCRIPTION"] = 76; + values[valuesById[77] = "INVALID_DISPLAY_NAME"] = 77; + values[valuesById[78] = "DISPLAY_NAME_ALREADY_USED"] = 78; + values[valuesById[79] = "OWNERSHIP_REQUIRED_FOR_UPDATE"] = 79; + values[valuesById[80] = "USER_LIST_MUTATION_NOT_SUPPORTED"] = 80; + values[valuesById[81] = "SENSITIVE_USER_LIST_IMMUTABLE"] = 81; + values[valuesById[82] = "BILLABLE_RECORD_COUNT_IMMUTABLE"] = 82; + values[valuesById[83] = "USER_LIST_NAME_RESERVED"] = 83; + values[valuesById[84] = "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA"] = 84; + values[valuesById[85] = "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE"] = 85; + values[valuesById[86] = "COMMERCE_PARTNER_NOT_ALLOWED"] = 86; + values[valuesById[87] = "UNSUPPORTED_PARTNER_AUDIENCE_INFO"] = 87; + values[valuesById[88] = "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED"] = 88; + values[valuesById[89] = "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 89; + values[valuesById[90] = "ADVERTISER_TOS_NOT_ACCEPTED"] = 90; + values[valuesById[91] = "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA"] = 91; + values[valuesById[92] = "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT"] = 92; + values[valuesById[93] = "INVALID_COMMERCE_PARTNER"] = 93; + values[valuesById[94] = "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE"] = 94; + values[valuesById[95] = "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES"] = 95; + values[valuesById[96] = "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG"] = 96; + values[valuesById[97] = "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE"] = 97; + values[valuesById[98] = "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK"] = 98; return values; })(); @@ -4855,11 +5478,11 @@ /** * Event conversionValue. - * @member {number} conversionValue + * @member {number|null|undefined} conversionValue * @memberof google.ads.datamanager.v1.Event * @instance */ - Event.prototype.conversionValue = 0; + Event.prototype.conversionValue = null; /** * Event eventSource. @@ -4941,6 +5564,15 @@ */ Event.prototype.additionalEventParameters = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Event.prototype, "_conversionValue", { + get: $util.oneOfGetter($oneOfFields = ["conversionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Event instance using the specified properties. * @function create @@ -5162,6 +5794,7 @@ Event.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"; @@ -5200,9 +5833,11 @@ if (message.currency != null && message.hasOwnProperty("currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.conversionValue != null && message.hasOwnProperty("conversionValue")) + if (message.conversionValue != null && message.hasOwnProperty("conversionValue")) { + properties._conversionValue = 1; if (typeof message.conversionValue !== "number") return "conversionValue: number expected"; + } if (message.eventSource != null && message.hasOwnProperty("eventSource")) switch (message.eventSource) { default: @@ -5432,7 +6067,6 @@ 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; @@ -5460,8 +6094,11 @@ 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")) + if (message.conversionValue != null && message.hasOwnProperty("conversionValue")) { object.conversionValue = options.json && !isFinite(message.conversionValue) ? String(message.conversionValue) : message.conversionValue; + if (options.oneofs) + object._conversionValue = "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")) @@ -7172,6 +7809,24 @@ return values; })(); + /** + * Gender enum. + * @name google.ads.datamanager.v1.Gender + * @enum {number} + * @property {number} GENDER_UNSPECIFIED=0 GENDER_UNSPECIFIED value + * @property {number} GENDER_UNKNOWN=1 GENDER_UNKNOWN value + * @property {number} GENDER_MALE=2 GENDER_MALE value + * @property {number} GENDER_FEMALE=3 GENDER_FEMALE value + */ + v1.Gender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "GENDER_UNKNOWN"] = 1; + values[valuesById[2] = "GENDER_MALE"] = 2; + values[valuesById[3] = "GENDER_FEMALE"] = 3; + return values; + })(); + v1.IngestionService = (function() { /** @@ -10066,6 +10721,8 @@ * @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 + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null} [userIdDataIngestionStatus] IngestAudienceMembersStatus userIdDataIngestionStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null} [ppidDataIngestionStatus] IngestAudienceMembersStatus ppidDataIngestionStatus */ /** @@ -10107,17 +10764,33 @@ */ IngestAudienceMembersStatus.prototype.pairDataIngestionStatus = null; + /** + * IngestAudienceMembersStatus userIdDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus|null|undefined} userIdDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.userIdDataIngestionStatus = null; + + /** + * IngestAudienceMembersStatus ppidDataIngestionStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus|null|undefined} ppidDataIngestionStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus + * @instance + */ + IngestAudienceMembersStatus.prototype.ppidDataIngestionStatus = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * IngestAudienceMembersStatus status. - * @member {"userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|undefined} status + * @member {"userDataIngestionStatus"|"mobileDataIngestionStatus"|"pairDataIngestionStatus"|"userIdDataIngestionStatus"|"ppidDataIngestionStatus"|undefined} status * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus * @instance */ Object.defineProperty(IngestAudienceMembersStatus.prototype, "status", { - get: $util.oneOfGetter($oneOfFields = ["userDataIngestionStatus", "mobileDataIngestionStatus", "pairDataIngestionStatus"]), + get: $util.oneOfGetter($oneOfFields = ["userDataIngestionStatus", "mobileDataIngestionStatus", "pairDataIngestionStatus", "userIdDataIngestionStatus", "ppidDataIngestionStatus"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10151,6 +10824,10 @@ $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(); + if (message.userIdDataIngestionStatus != null && Object.hasOwnProperty.call(message, "userIdDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.encode(message.userIdDataIngestionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ppidDataIngestionStatus != null && Object.hasOwnProperty.call(message, "ppidDataIngestionStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.encode(message.ppidDataIngestionStatus, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -10199,6 +10876,14 @@ message.pairDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.decode(reader, reader.uint32()); break; } + case 4: { + message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10263,6 +10948,26 @@ return "pairDataIngestionStatus." + error; } } + if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify(message.userIdDataIngestionStatus); + if (error) + return "userIdDataIngestionStatus." + error; + } + } + if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify(message.ppidDataIngestionStatus); + if (error) + return "ppidDataIngestionStatus." + error; + } + } return null; }; @@ -10293,6 +10998,16 @@ throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.pairDataIngestionStatus: object expected"); message.pairDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPairDataStatus.fromObject(object.pairDataIngestionStatus); } + if (object.userIdDataIngestionStatus != null) { + if (typeof object.userIdDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.userIdDataIngestionStatus: object expected"); + message.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.fromObject(object.userIdDataIngestionStatus); + } + if (object.ppidDataIngestionStatus != null) { + if (typeof object.ppidDataIngestionStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.IngestAudienceMembersStatus.ppidDataIngestionStatus: object expected"); + message.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.fromObject(object.ppidDataIngestionStatus); + } return message; }; @@ -10324,6 +11039,16 @@ if (options.oneofs) object.status = "pairDataIngestionStatus"; } + if (message.userIdDataIngestionStatus != null && message.hasOwnProperty("userIdDataIngestionStatus")) { + object.userIdDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.toObject(message.userIdDataIngestionStatus, options); + if (options.oneofs) + object.status = "userIdDataIngestionStatus"; + } + if (message.ppidDataIngestionStatus != null && message.hasOwnProperty("ppidDataIngestionStatus")) { + object.ppidDataIngestionStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.toObject(message.ppidDataIngestionStatus, options); + if (options.oneofs) + object.status = "ppidDataIngestionStatus"; + } return object; }; @@ -10365,6 +11090,8 @@ * @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 + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null} [userIdDataRemovalStatus] RemoveAudienceMembersStatus userIdDataRemovalStatus + * @property {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null} [ppidDataRemovalStatus] RemoveAudienceMembersStatus ppidDataRemovalStatus */ /** @@ -10406,17 +11133,33 @@ */ RemoveAudienceMembersStatus.prototype.pairDataRemovalStatus = null; + /** + * RemoveAudienceMembersStatus userIdDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus|null|undefined} userIdDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.userIdDataRemovalStatus = null; + + /** + * RemoveAudienceMembersStatus ppidDataRemovalStatus. + * @member {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus|null|undefined} ppidDataRemovalStatus + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus + * @instance + */ + RemoveAudienceMembersStatus.prototype.ppidDataRemovalStatus = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * RemoveAudienceMembersStatus status. - * @member {"userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|undefined} status + * @member {"userDataRemovalStatus"|"mobileDataRemovalStatus"|"pairDataRemovalStatus"|"userIdDataRemovalStatus"|"ppidDataRemovalStatus"|undefined} status * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus * @instance */ Object.defineProperty(RemoveAudienceMembersStatus.prototype, "status", { - get: $util.oneOfGetter($oneOfFields = ["userDataRemovalStatus", "mobileDataRemovalStatus", "pairDataRemovalStatus"]), + get: $util.oneOfGetter($oneOfFields = ["userDataRemovalStatus", "mobileDataRemovalStatus", "pairDataRemovalStatus", "userIdDataRemovalStatus", "ppidDataRemovalStatus"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10450,6 +11193,10 @@ $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(); + if (message.userIdDataRemovalStatus != null && Object.hasOwnProperty.call(message, "userIdDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.encode(message.userIdDataRemovalStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ppidDataRemovalStatus != null && Object.hasOwnProperty.call(message, "ppidDataRemovalStatus")) + $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.encode(message.ppidDataRemovalStatus, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -10498,6 +11245,14 @@ message.pairDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.decode(reader, reader.uint32()); break; } + case 4: { + message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10562,6 +11317,26 @@ return "pairDataRemovalStatus." + error; } } + if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify(message.userIdDataRemovalStatus); + if (error) + return "userIdDataRemovalStatus." + error; + } + } + if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { + if (properties.status === 1) + return "status: multiple values"; + properties.status = 1; + { + var error = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify(message.ppidDataRemovalStatus); + if (error) + return "ppidDataRemovalStatus." + error; + } + } return null; }; @@ -10592,6 +11367,16 @@ throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.pairDataRemovalStatus: object expected"); message.pairDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePairDataStatus.fromObject(object.pairDataRemovalStatus); } + if (object.userIdDataRemovalStatus != null) { + if (typeof object.userIdDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.userIdDataRemovalStatus: object expected"); + message.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.fromObject(object.userIdDataRemovalStatus); + } + if (object.ppidDataRemovalStatus != null) { + if (typeof object.ppidDataRemovalStatus !== "object") + throw TypeError(".google.ads.datamanager.v1.RequestStatusPerDestination.RemoveAudienceMembersStatus.ppidDataRemovalStatus: object expected"); + message.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.fromObject(object.ppidDataRemovalStatus); + } return message; }; @@ -10623,6 +11408,16 @@ if (options.oneofs) object.status = "pairDataRemovalStatus"; } + if (message.userIdDataRemovalStatus != null && message.hasOwnProperty("userIdDataRemovalStatus")) { + object.userIdDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.toObject(message.userIdDataRemovalStatus, options); + if (options.oneofs) + object.status = "userIdDataRemovalStatus"; + } + if (message.ppidDataRemovalStatus != null && message.hasOwnProperty("ppidDataRemovalStatus")) { + object.ppidDataRemovalStatus = $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.toObject(message.ppidDataRemovalStatus, options); + if (options.oneofs) + object.status = "ppidDataRemovalStatus"; + } return object; }; @@ -12503,286 +13298,15669 @@ 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; - })(); + RequestStatusPerDestination.IngestUserIdDataStatus = (function() { - v1.ErrorInfo = (function() { + /** + * Properties of an IngestUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestUserIdDataStatus + * @property {number|Long|null} [recordCount] IngestUserIdDataStatus recordCount + * @property {number|Long|null} [userIdCount] IngestUserIdDataStatus userIdCount + */ - /** - * Properties of an ErrorInfo. - * @memberof google.ads.datamanager.v1 - * @interface IErrorInfo - * @property {Array.|null} [errorCounts] ErrorInfo errorCounts - */ + /** + * Constructs a new IngestUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestUserIdDataStatus. + * @implements IIngestUserIdDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set + */ + function IngestUserIdDataStatus(properties) { + if (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 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]]; - } + /** + * IngestUserIdDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + */ + IngestUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * ErrorInfo errorCounts. - * @member {Array.} errorCounts - * @memberof google.ads.datamanager.v1.ErrorInfo - * @instance - */ - ErrorInfo.prototype.errorCounts = $util.emptyArray; + /** + * IngestUserIdDataStatus userIdCount. + * @member {number|Long} userIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + */ + IngestUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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); - }; + /** + * Creates a new IngestUserIdDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus instance + */ + IngestUserIdDataStatus.create = function create(properties) { + return new IngestUserIdDataStatus(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 IngestUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); + 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(); - }; + /** + * Encodes the specified IngestUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestUserIdDataStatus} message IngestUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestUserIdDataStatus.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())); + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @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.IngestUserIdDataStatus} IngestUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserIdDataStatus.decode = function decode(reader, 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.IngestUserIdDataStatus(); + 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.userIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * Decodes an IngestUserIdDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestUserIdDataStatus.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; - }; + /** + * Verifies an IngestUserIdDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) + return "userIdCount: integer|Long expected"; + 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) + /** + * Creates an IngestUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} IngestUserIdDataStatus + */ + IngestUserIdDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus(); + 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.userIdCount != null) + if ($util.Long) + (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; + else if (typeof object.userIdCount === "string") + message.userIdCount = parseInt(object.userIdCount, 10); + else if (typeof object.userIdCount === "number") + message.userIdCount = object.userIdCount; + else if (typeof object.userIdCount === "object") + message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestUserIdDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus} message IngestUserIdDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (typeof message.userIdCount === "number") + object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; + else + object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; 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]); + }; + + /** + * Converts this IngestUserIdDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestUserIdDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestUserIdDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return message; - }; + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestUserIdDataStatus"; + }; - /** - * 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; - }; + return IngestUserIdDataStatus; + })(); - /** - * 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); - }; + RequestStatusPerDestination.RemoveUserIdDataStatus = (function() { - /** - * 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"; + /** + * Properties of a RemoveUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemoveUserIdDataStatus + * @property {number|Long|null} [recordCount] RemoveUserIdDataStatus recordCount + * @property {number|Long|null} [userIdCount] RemoveUserIdDataStatus userIdCount + */ + + /** + * Constructs a new RemoveUserIdDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemoveUserIdDataStatus. + * @implements IRemoveUserIdDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set + */ + function RemoveUserIdDataStatus(properties) { + if (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.datamanager.v1.ErrorInfo"; - }; - return ErrorInfo; - })(); + /** + * RemoveUserIdDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + */ + RemoveUserIdDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - v1.ErrorCount = (function() { + /** + * RemoveUserIdDataStatus userIdCount. + * @member {number|Long} userIdCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + */ + RemoveUserIdDataStatus.prototype.userIdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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 - */ + /** + * Creates a new RemoveUserIdDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus instance + */ + RemoveUserIdDataStatus.create = function create(properties) { + return new RemoveUserIdDataStatus(properties); + }; + + /** + * Encodes the specified RemoveUserIdDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserIdDataStatus.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.userIdCount != null && Object.hasOwnProperty.call(message, "userIdCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userIdCount); + return writer; + }; + + /** + * Encodes the specified RemoveUserIdDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemoveUserIdDataStatus} message RemoveUserIdDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveUserIdDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @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.RemoveUserIdDataStatus} RemoveUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserIdDataStatus.decode = function decode(reader, 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.RemoveUserIdDataStatus(); + 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.userIdCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveUserIdDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveUserIdDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveUserIdDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveUserIdDataStatus.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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (!$util.isInteger(message.userIdCount) && !(message.userIdCount && $util.isInteger(message.userIdCount.low) && $util.isInteger(message.userIdCount.high))) + return "userIdCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemoveUserIdDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} RemoveUserIdDataStatus + */ + RemoveUserIdDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus(); + 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.userIdCount != null) + if ($util.Long) + (message.userIdCount = $util.Long.fromValue(object.userIdCount)).unsigned = false; + else if (typeof object.userIdCount === "string") + message.userIdCount = parseInt(object.userIdCount, 10); + else if (typeof object.userIdCount === "number") + message.userIdCount = object.userIdCount; + else if (typeof object.userIdCount === "object") + message.userIdCount = new $util.LongBits(object.userIdCount.low >>> 0, object.userIdCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemoveUserIdDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus} message RemoveUserIdDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveUserIdDataStatus.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.userIdCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userIdCount = 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.userIdCount != null && message.hasOwnProperty("userIdCount")) + if (typeof message.userIdCount === "number") + object.userIdCount = options.longs === String ? String(message.userIdCount) : message.userIdCount; + else + object.userIdCount = options.longs === String ? $util.Long.prototype.toString.call(message.userIdCount) : options.longs === Number ? new $util.LongBits(message.userIdCount.low >>> 0, message.userIdCount.high >>> 0).toNumber() : message.userIdCount; + return object; + }; + + /** + * Converts this RemoveUserIdDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemoveUserIdDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveUserIdDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveUserIdDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemoveUserIdDataStatus"; + }; + + return RemoveUserIdDataStatus; + })(); + + RequestStatusPerDestination.IngestPpidDataStatus = (function() { + + /** + * Properties of an IngestPpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IIngestPpidDataStatus + * @property {number|Long|null} [recordCount] IngestPpidDataStatus recordCount + * @property {number|Long|null} [ppidCount] IngestPpidDataStatus ppidCount + */ + + /** + * Constructs a new IngestPpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents an IngestPpidDataStatus. + * @implements IIngestPpidDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set + */ + function IngestPpidDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestPpidDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + */ + IngestPpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IngestPpidDataStatus ppidCount. + * @member {number|Long} ppidCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + */ + IngestPpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IngestPpidDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus instance + */ + IngestPpidDataStatus.create = function create(properties) { + return new IngestPpidDataStatus(properties); + }; + + /** + * Encodes the specified IngestPpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); + return writer; + }; + + /** + * Encodes the specified IngestPpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IIngestPpidDataStatus} message IngestPpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestPpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @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.IngestPpidDataStatus} IngestPpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPpidDataStatus.decode = function decode(reader, 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.IngestPpidDataStatus(); + 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.ppidCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestPpidDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestPpidDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestPpidDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestPpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) + return "ppidCount: integer|Long expected"; + return null; + }; + + /** + * Creates an IngestPpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} IngestPpidDataStatus + */ + IngestPpidDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus(); + 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.ppidCount != null) + if ($util.Long) + (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; + else if (typeof object.ppidCount === "string") + message.ppidCount = parseInt(object.ppidCount, 10); + else if (typeof object.ppidCount === "number") + message.ppidCount = object.ppidCount; + else if (typeof object.ppidCount === "object") + message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IngestPpidDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus} message IngestPpidDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestPpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (typeof message.ppidCount === "number") + object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; + else + object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; + return object; + }; + + /** + * Converts this IngestPpidDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @instance + * @returns {Object.} JSON object + */ + IngestPpidDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestPpidDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestPpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.IngestPpidDataStatus"; + }; + + return IngestPpidDataStatus; + })(); + + RequestStatusPerDestination.RemovePpidDataStatus = (function() { + + /** + * Properties of a RemovePpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @interface IRemovePpidDataStatus + * @property {number|Long|null} [recordCount] RemovePpidDataStatus recordCount + * @property {number|Long|null} [ppidCount] RemovePpidDataStatus ppidCount + */ + + /** + * Constructs a new RemovePpidDataStatus. + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination + * @classdesc Represents a RemovePpidDataStatus. + * @implements IRemovePpidDataStatus + * @constructor + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set + */ + function RemovePpidDataStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemovePpidDataStatus recordCount. + * @member {number|Long} recordCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + */ + RemovePpidDataStatus.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RemovePpidDataStatus ppidCount. + * @member {number|Long} ppidCount + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + */ + RemovePpidDataStatus.prototype.ppidCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RemovePpidDataStatus instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus instance + */ + RemovePpidDataStatus.create = function create(properties) { + return new RemovePpidDataStatus(properties); + }; + + /** + * Encodes the specified RemovePpidDataStatus message. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePpidDataStatus.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.ppidCount != null && Object.hasOwnProperty.call(message, "ppidCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ppidCount); + return writer; + }; + + /** + * Encodes the specified RemovePpidDataStatus message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.IRemovePpidDataStatus} message RemovePpidDataStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePpidDataStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @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.RemovePpidDataStatus} RemovePpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePpidDataStatus.decode = function decode(reader, 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.RemovePpidDataStatus(); + 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.ppidCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePpidDataStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePpidDataStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePpidDataStatus message. + * @function verify + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePpidDataStatus.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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (!$util.isInteger(message.ppidCount) && !(message.ppidCount && $util.isInteger(message.ppidCount.low) && $util.isInteger(message.ppidCount.high))) + return "ppidCount: integer|Long expected"; + return null; + }; + + /** + * Creates a RemovePpidDataStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} RemovePpidDataStatus + */ + RemovePpidDataStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus) + return object; + var message = new $root.google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus(); + 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.ppidCount != null) + if ($util.Long) + (message.ppidCount = $util.Long.fromValue(object.ppidCount)).unsigned = false; + else if (typeof object.ppidCount === "string") + message.ppidCount = parseInt(object.ppidCount, 10); + else if (typeof object.ppidCount === "number") + message.ppidCount = object.ppidCount; + else if (typeof object.ppidCount === "object") + message.ppidCount = new $util.LongBits(object.ppidCount.low >>> 0, object.ppidCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RemovePpidDataStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus} message RemovePpidDataStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePpidDataStatus.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.ppidCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ppidCount = 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.ppidCount != null && message.hasOwnProperty("ppidCount")) + if (typeof message.ppidCount === "number") + object.ppidCount = options.longs === String ? String(message.ppidCount) : message.ppidCount; + else + object.ppidCount = options.longs === String ? $util.Long.prototype.toString.call(message.ppidCount) : options.longs === Number ? new $util.LongBits(message.ppidCount.low >>> 0, message.ppidCount.high >>> 0).toNumber() : message.ppidCount; + return object; + }; + + /** + * Converts this RemovePpidDataStatus to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @instance + * @returns {Object.} JSON object + */ + RemovePpidDataStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePpidDataStatus + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePpidDataStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RequestStatusPerDestination.RemovePpidDataStatus"; + }; + + return RemovePpidDataStatus; + })(); + + 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 27: + 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_AWS_AUTH_FAILED": + case 27: + message.reason = 27; + 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: + case 9: + 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; + case "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": + case 9: + message.reason = 9; + 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_AWS_AUTH_FAILED=27 PROCESSING_ERROR_REASON_AWS_AUTH_FAILED 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[27] = "PROCESSING_ERROR_REASON_AWS_AUTH_FAILED"] = 27; + 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 + * @property {number} PROCESSING_WARNING_REASON_AWS_AUTH_FAILED=9 PROCESSING_WARNING_REASON_AWS_AUTH_FAILED 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; + values[valuesById[9] = "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED"] = 9; + 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; + })(); + + v1.MarketingDataInsightsService = (function() { + + /** + * Constructs a new MarketingDataInsightsService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a MarketingDataInsightsService + * @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 MarketingDataInsightsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MarketingDataInsightsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MarketingDataInsightsService; + + /** + * Creates new MarketingDataInsightsService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @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 {MarketingDataInsightsService} RPC service. Useful where requests and/or responses are streamed. + */ + MarketingDataInsightsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.MarketingDataInsightsService|retrieveInsights}. + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @typedef RetrieveInsightsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} [response] RetrieveInsightsResponse + */ + + /** + * Calls RetrieveInsights. + * @function retrieveInsights + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object + * @param {google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsightsCallback} callback Node-style callback called with the error, if any, and RetrieveInsightsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingDataInsightsService.prototype.retrieveInsights = function retrieveInsights(request, callback) { + return this.rpcCall(retrieveInsights, $root.google.ads.datamanager.v1.RetrieveInsightsRequest, $root.google.ads.datamanager.v1.RetrieveInsightsResponse, request, callback); + }, "name", { value: "RetrieveInsights" }); + + /** + * Calls RetrieveInsights. + * @function retrieveInsights + * @memberof google.ads.datamanager.v1.MarketingDataInsightsService + * @instance + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} request RetrieveInsightsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MarketingDataInsightsService; + })(); + + v1.RetrieveInsightsRequest = (function() { + + /** + * Properties of a RetrieveInsightsRequest. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveInsightsRequest + * @property {string|null} [parent] RetrieveInsightsRequest parent + * @property {google.ads.datamanager.v1.IBaseline|null} [baseline] RetrieveInsightsRequest baseline + * @property {string|null} [userListId] RetrieveInsightsRequest userListId + */ + + /** + * Constructs a new RetrieveInsightsRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveInsightsRequest. + * @implements IRetrieveInsightsRequest + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set + */ + function RetrieveInsightsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveInsightsRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.parent = ""; + + /** + * RetrieveInsightsRequest baseline. + * @member {google.ads.datamanager.v1.IBaseline|null|undefined} baseline + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.baseline = null; + + /** + * RetrieveInsightsRequest userListId. + * @member {string} userListId + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + */ + RetrieveInsightsRequest.prototype.userListId = ""; + + /** + * Creates a new RetrieveInsightsRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest instance + */ + RetrieveInsightsRequest.create = function create(properties) { + return new RetrieveInsightsRequest(properties); + }; + + /** + * Encodes the specified RetrieveInsightsRequest message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsRequest.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.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + $root.google.ads.datamanager.v1.Baseline.encode(message.baseline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListId); + return writer; + }; + + /** + * Encodes the specified RetrieveInsightsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsRequest} message RetrieveInsightsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @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.RetrieveInsightsRequest} RetrieveInsightsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsRequest.decode = function decode(reader, 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.RetrieveInsightsRequest(); + 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.baseline = $root.google.ads.datamanager.v1.Baseline.decode(reader, reader.uint32()); + break; + } + case 3: { + message.userListId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveInsightsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveInsightsRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveInsightsRequest.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.baseline != null && message.hasOwnProperty("baseline")) { + var error = $root.google.ads.datamanager.v1.Baseline.verify(message.baseline); + if (error) + return "baseline." + error; + } + if (message.userListId != null && message.hasOwnProperty("userListId")) + if (!$util.isString(message.userListId)) + return "userListId: string expected"; + return null; + }; + + /** + * Creates a RetrieveInsightsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsRequest} RetrieveInsightsRequest + */ + RetrieveInsightsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsRequest) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.baseline != null) { + if (typeof object.baseline !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsRequest.baseline: object expected"); + message.baseline = $root.google.ads.datamanager.v1.Baseline.fromObject(object.baseline); + } + if (object.userListId != null) + message.userListId = String(object.userListId); + return message; + }; + + /** + * Creates a plain object from a RetrieveInsightsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsRequest} message RetrieveInsightsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveInsightsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.baseline = null; + object.userListId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = $root.google.ads.datamanager.v1.Baseline.toObject(message.baseline, options); + if (message.userListId != null && message.hasOwnProperty("userListId")) + object.userListId = message.userListId; + return object; + }; + + /** + * Converts this RetrieveInsightsRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @instance + * @returns {Object.} JSON object + */ + RetrieveInsightsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveInsightsRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveInsightsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsRequest"; + }; + + return RetrieveInsightsRequest; + })(); + + v1.Baseline = (function() { + + /** + * Properties of a Baseline. + * @memberof google.ads.datamanager.v1 + * @interface IBaseline + * @property {google.ads.datamanager.v1.Baseline.ILocation|null} [baselineLocation] Baseline baselineLocation + * @property {boolean|null} [locationAutoDetectionEnabled] Baseline locationAutoDetectionEnabled + */ + + /** + * Constructs a new Baseline. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a Baseline. + * @implements IBaseline + * @constructor + * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set + */ + function Baseline(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Baseline baselineLocation. + * @member {google.ads.datamanager.v1.Baseline.ILocation|null|undefined} baselineLocation + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Baseline.prototype.baselineLocation = null; + + /** + * Baseline locationAutoDetectionEnabled. + * @member {boolean|null|undefined} locationAutoDetectionEnabled + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Baseline.prototype.locationAutoDetectionEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Baseline baseline. + * @member {"baselineLocation"|"locationAutoDetectionEnabled"|undefined} baseline + * @memberof google.ads.datamanager.v1.Baseline + * @instance + */ + Object.defineProperty(Baseline.prototype, "baseline", { + get: $util.oneOfGetter($oneOfFields = ["baselineLocation", "locationAutoDetectionEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Baseline instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Baseline} Baseline instance + */ + Baseline.create = function create(properties) { + return new Baseline(properties); + }; + + /** + * Encodes the specified Baseline message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Baseline.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baselineLocation != null && Object.hasOwnProperty.call(message, "baselineLocation")) + $root.google.ads.datamanager.v1.Baseline.Location.encode(message.baselineLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.locationAutoDetectionEnabled != null && Object.hasOwnProperty.call(message, "locationAutoDetectionEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.locationAutoDetectionEnabled); + return writer; + }; + + /** + * Encodes the specified Baseline message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.IBaseline} message Baseline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Baseline.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Baseline message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.Baseline + * @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.Baseline} Baseline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Baseline.decode = function decode(reader, 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.Baseline(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.decode(reader, reader.uint32()); + break; + } + case 2: { + message.locationAutoDetectionEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Baseline message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Baseline} Baseline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Baseline.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Baseline message. + * @function verify + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Baseline.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { + properties.baseline = 1; + { + var error = $root.google.ads.datamanager.v1.Baseline.Location.verify(message.baselineLocation); + if (error) + return "baselineLocation." + error; + } + } + if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { + if (properties.baseline === 1) + return "baseline: multiple values"; + properties.baseline = 1; + if (typeof message.locationAutoDetectionEnabled !== "boolean") + return "locationAutoDetectionEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a Baseline message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Baseline} Baseline + */ + Baseline.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Baseline) + return object; + var message = new $root.google.ads.datamanager.v1.Baseline(); + if (object.baselineLocation != null) { + if (typeof object.baselineLocation !== "object") + throw TypeError(".google.ads.datamanager.v1.Baseline.baselineLocation: object expected"); + message.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.fromObject(object.baselineLocation); + } + if (object.locationAutoDetectionEnabled != null) + message.locationAutoDetectionEnabled = Boolean(object.locationAutoDetectionEnabled); + return message; + }; + + /** + * Creates a plain object from a Baseline message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {google.ads.datamanager.v1.Baseline} message Baseline + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Baseline.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.baselineLocation != null && message.hasOwnProperty("baselineLocation")) { + object.baselineLocation = $root.google.ads.datamanager.v1.Baseline.Location.toObject(message.baselineLocation, options); + if (options.oneofs) + object.baseline = "baselineLocation"; + } + if (message.locationAutoDetectionEnabled != null && message.hasOwnProperty("locationAutoDetectionEnabled")) { + object.locationAutoDetectionEnabled = message.locationAutoDetectionEnabled; + if (options.oneofs) + object.baseline = "locationAutoDetectionEnabled"; + } + return object; + }; + + /** + * Converts this Baseline to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Baseline + * @instance + * @returns {Object.} JSON object + */ + Baseline.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Baseline + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.Baseline + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Baseline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.Baseline"; + }; + + Baseline.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.ads.datamanager.v1.Baseline + * @interface ILocation + * @property {Array.|null} [regionCodes] Location regionCodes + */ + + /** + * Constructs a new Location. + * @memberof google.ads.datamanager.v1.Baseline + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.regionCodes = []; + if (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 regionCodes. + * @member {Array.} regionCodes + * @memberof google.ads.datamanager.v1.Baseline.Location + * @instance + */ + Location.prototype.regionCodes = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.ILocation=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.Baseline.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.regionCodes != null && message.regionCodes.length) + for (var i = 0; i < message.regionCodes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.regionCodes[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.Baseline.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location + * @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.Baseline.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.ads.datamanager.v1.Baseline.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.regionCodes && message.regionCodes.length)) + message.regionCodes = []; + message.regionCodes.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.ads.datamanager.v1.Baseline.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.regionCodes != null && message.hasOwnProperty("regionCodes")) { + if (!Array.isArray(message.regionCodes)) + return "regionCodes: array expected"; + for (var i = 0; i < message.regionCodes.length; ++i) + if (!$util.isString(message.regionCodes[i])) + return "regionCodes: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.Baseline.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.Baseline.Location) + return object; + var message = new $root.google.ads.datamanager.v1.Baseline.Location(); + if (object.regionCodes) { + if (!Array.isArray(object.regionCodes)) + throw TypeError(".google.ads.datamanager.v1.Baseline.Location.regionCodes: array expected"); + message.regionCodes = []; + for (var i = 0; i < object.regionCodes.length; ++i) + message.regionCodes[i] = String(object.regionCodes[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.Baseline.Location + * @static + * @param {google.ads.datamanager.v1.Baseline.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.regionCodes = []; + if (message.regionCodes && message.regionCodes.length) { + object.regionCodes = []; + for (var j = 0; j < message.regionCodes.length; ++j) + object.regionCodes[j] = message.regionCodes[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.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.ads.datamanager.v1.Baseline.Location"; + }; + + return Location; + })(); + + return Baseline; + })(); + + v1.RetrieveInsightsResponse = (function() { + + /** + * Properties of a RetrieveInsightsResponse. + * @memberof google.ads.datamanager.v1 + * @interface IRetrieveInsightsResponse + * @property {Array.|null} [marketingDataInsights] RetrieveInsightsResponse marketingDataInsights + */ + + /** + * Constructs a new RetrieveInsightsResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a RetrieveInsightsResponse. + * @implements IRetrieveInsightsResponse + * @constructor + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set + */ + function RetrieveInsightsResponse(properties) { + this.marketingDataInsights = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetrieveInsightsResponse marketingDataInsights. + * @member {Array.} marketingDataInsights + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @instance + */ + RetrieveInsightsResponse.prototype.marketingDataInsights = $util.emptyArray; + + /** + * Creates a new RetrieveInsightsResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse instance + */ + RetrieveInsightsResponse.create = function create(properties) { + return new RetrieveInsightsResponse(properties); + }; + + /** + * Encodes the specified RetrieveInsightsResponse message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.marketingDataInsights != null && message.marketingDataInsights.length) + for (var i = 0; i < message.marketingDataInsights.length; ++i) + $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.encode(message.marketingDataInsights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetrieveInsightsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.IRetrieveInsightsResponse} message RetrieveInsightsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetrieveInsightsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @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.RetrieveInsightsResponse} RetrieveInsightsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsResponse.decode = function decode(reader, 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.RetrieveInsightsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.marketingDataInsights && message.marketingDataInsights.length)) + message.marketingDataInsights = []; + message.marketingDataInsights.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetrieveInsightsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetrieveInsightsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetrieveInsightsResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetrieveInsightsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.marketingDataInsights != null && message.hasOwnProperty("marketingDataInsights")) { + if (!Array.isArray(message.marketingDataInsights)) + return "marketingDataInsights: array expected"; + for (var i = 0; i < message.marketingDataInsights.length; ++i) { + var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify(message.marketingDataInsights[i]); + if (error) + return "marketingDataInsights." + error; + } + } + return null; + }; + + /** + * Creates a RetrieveInsightsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse} RetrieveInsightsResponse + */ + RetrieveInsightsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse(); + if (object.marketingDataInsights) { + if (!Array.isArray(object.marketingDataInsights)) + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: array expected"); + message.marketingDataInsights = []; + for (var i = 0; i < object.marketingDataInsights.length; ++i) { + if (typeof object.marketingDataInsights[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.marketingDataInsights: object expected"); + message.marketingDataInsights[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.fromObject(object.marketingDataInsights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RetrieveInsightsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse} message RetrieveInsightsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetrieveInsightsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.marketingDataInsights = []; + if (message.marketingDataInsights && message.marketingDataInsights.length) { + object.marketingDataInsights = []; + for (var j = 0; j < message.marketingDataInsights.length; ++j) + object.marketingDataInsights[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.toObject(message.marketingDataInsights[j], options); + } + return object; + }; + + /** + * Converts this RetrieveInsightsResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @instance + * @returns {Object.} JSON object + */ + RetrieveInsightsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetrieveInsightsResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetrieveInsightsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse"; + }; + + RetrieveInsightsResponse.MarketingDataInsight = (function() { + + /** + * Properties of a MarketingDataInsight. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @interface IMarketingDataInsight + * @property {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension|null} [dimension] MarketingDataInsight dimension + * @property {Array.|null} [attributes] MarketingDataInsight attributes + */ + + /** + * Constructs a new MarketingDataInsight. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse + * @classdesc Represents a MarketingDataInsight. + * @implements IMarketingDataInsight + * @constructor + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set + */ + function MarketingDataInsight(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MarketingDataInsight dimension. + * @member {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension} dimension + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + */ + MarketingDataInsight.prototype.dimension = 0; + + /** + * MarketingDataInsight attributes. + * @member {Array.} attributes + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + */ + MarketingDataInsight.prototype.attributes = $util.emptyArray; + + /** + * Creates a new MarketingDataInsight instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight instance + */ + MarketingDataInsight.create = function create(properties) { + return new MarketingDataInsight(properties); + }; + + /** + * Encodes the specified MarketingDataInsight message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsight.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.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MarketingDataInsight message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.IMarketingDataInsight} message MarketingDataInsight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @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.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsight.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dimension = reader.int32(); + break; + } + case 2: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarketingDataInsight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarketingDataInsight message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarketingDataInsight.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 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates a MarketingDataInsight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} MarketingDataInsight + */ + MarketingDataInsight.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight(); + switch (object.dimension) { + default: + if (typeof object.dimension === "number") { + message.dimension = object.dimension; + break; + } + break; + case "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": + case 0: + message.dimension = 0; + break; + case "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": + case 1: + message.dimension = 1; + break; + case "AFFINITY_USER_INTEREST": + case 2: + message.dimension = 2; + break; + case "IN_MARKET_USER_INTEREST": + case 3: + message.dimension = 3; + break; + case "AGE_RANGE": + case 4: + message.dimension = 4; + break; + case "GENDER": + case 5: + message.dimension = 5; + break; + } + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.attributes: object expected"); + message.attributes[i] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MarketingDataInsight message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight} message MarketingDataInsight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarketingDataInsight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.dimension = options.enums === String ? "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED" : 0; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = options.enums === String ? $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] === undefined ? message.dimension : $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension[message.dimension] : message.dimension; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this MarketingDataInsight to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @instance + * @returns {Object.} JSON object + */ + MarketingDataInsight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MarketingDataInsight + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingDataInsight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight"; + }; + + /** + * AudienceInsightsDimension enum. + * @name google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension + * @enum {number} + * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED=0 AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED value + * @property {number} AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN=1 AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN value + * @property {number} AFFINITY_USER_INTEREST=2 AFFINITY_USER_INTEREST value + * @property {number} IN_MARKET_USER_INTEREST=3 IN_MARKET_USER_INTEREST value + * @property {number} AGE_RANGE=4 AGE_RANGE value + * @property {number} GENDER=5 GENDER value + */ + MarketingDataInsight.AudienceInsightsDimension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN"] = 1; + values[valuesById[2] = "AFFINITY_USER_INTEREST"] = 2; + values[valuesById[3] = "IN_MARKET_USER_INTEREST"] = 3; + values[valuesById[4] = "AGE_RANGE"] = 4; + values[valuesById[5] = "GENDER"] = 5; + return values; + })(); + + MarketingDataInsight.MarketingDataInsightsAttribute = (function() { + + /** + * Properties of a MarketingDataInsightsAttribute. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @interface IMarketingDataInsightsAttribute + * @property {number|Long|null} [userInterestId] MarketingDataInsightsAttribute userInterestId + * @property {number|null} [lift] MarketingDataInsightsAttribute lift + * @property {google.ads.datamanager.v1.AgeRange|null} [ageRange] MarketingDataInsightsAttribute ageRange + * @property {google.ads.datamanager.v1.Gender|null} [gender] MarketingDataInsightsAttribute gender + */ + + /** + * Constructs a new MarketingDataInsightsAttribute. + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight + * @classdesc Represents a MarketingDataInsightsAttribute. + * @implements IMarketingDataInsightsAttribute + * @constructor + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set + */ + function MarketingDataInsightsAttribute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MarketingDataInsightsAttribute userInterestId. + * @member {number|Long|null|undefined} userInterestId + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.userInterestId = null; + + /** + * MarketingDataInsightsAttribute lift. + * @member {number|null|undefined} lift + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.lift = null; + + /** + * MarketingDataInsightsAttribute ageRange. + * @member {google.ads.datamanager.v1.AgeRange|null|undefined} ageRange + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.ageRange = null; + + /** + * MarketingDataInsightsAttribute gender. + * @member {google.ads.datamanager.v1.Gender|null|undefined} gender + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + */ + MarketingDataInsightsAttribute.prototype.gender = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_userInterestId", { + get: $util.oneOfGetter($oneOfFields = ["userInterestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_lift", { + get: $util.oneOfGetter($oneOfFields = ["lift"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_ageRange", { + get: $util.oneOfGetter($oneOfFields = ["ageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingDataInsightsAttribute.prototype, "_gender", { + get: $util.oneOfGetter($oneOfFields = ["gender"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MarketingDataInsightsAttribute instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute instance + */ + MarketingDataInsightsAttribute.create = function create(properties) { + return new MarketingDataInsightsAttribute(properties); + }; + + /** + * Encodes the specified MarketingDataInsightsAttribute message. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsightsAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userInterestId != null && Object.hasOwnProperty.call(message, "userInterestId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.userInterestId); + if (message.lift != null && Object.hasOwnProperty.call(message, "lift")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.lift); + if (message.ageRange != null && Object.hasOwnProperty.call(message, "ageRange")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ageRange); + if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.gender); + return writer; + }; + + /** + * Encodes the specified MarketingDataInsightsAttribute message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.IMarketingDataInsightsAttribute} message MarketingDataInsightsAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarketingDataInsightsAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsightsAttribute.decode = function decode(reader, 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.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userInterestId = reader.int64(); + break; + } + case 2: { + message.lift = reader.float(); + break; + } + case 3: { + message.ageRange = reader.int32(); + break; + } + case 4: { + message.gender = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarketingDataInsightsAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarketingDataInsightsAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarketingDataInsightsAttribute message. + * @function verify + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarketingDataInsightsAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { + properties._userInterestId = 1; + if (!$util.isInteger(message.userInterestId) && !(message.userInterestId && $util.isInteger(message.userInterestId.low) && $util.isInteger(message.userInterestId.high))) + return "userInterestId: integer|Long expected"; + } + if (message.lift != null && message.hasOwnProperty("lift")) { + properties._lift = 1; + if (typeof message.lift !== "number") + return "lift: number expected"; + } + if (message.ageRange != null && message.hasOwnProperty("ageRange")) { + properties._ageRange = 1; + switch (message.ageRange) { + default: + return "ageRange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.gender != null && message.hasOwnProperty("gender")) { + properties._gender = 1; + switch (message.gender) { + default: + return "gender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a MarketingDataInsightsAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} MarketingDataInsightsAttribute + */ + MarketingDataInsightsAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute) + return object; + var message = new $root.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute(); + if (object.userInterestId != null) + if ($util.Long) + (message.userInterestId = $util.Long.fromValue(object.userInterestId)).unsigned = false; + else if (typeof object.userInterestId === "string") + message.userInterestId = parseInt(object.userInterestId, 10); + else if (typeof object.userInterestId === "number") + message.userInterestId = object.userInterestId; + else if (typeof object.userInterestId === "object") + message.userInterestId = new $util.LongBits(object.userInterestId.low >>> 0, object.userInterestId.high >>> 0).toNumber(); + if (object.lift != null) + message.lift = Number(object.lift); + switch (object.ageRange) { + default: + if (typeof object.ageRange === "number") { + message.ageRange = object.ageRange; + break; + } + break; + case "AGE_RANGE_UNSPECIFIED": + case 0: + message.ageRange = 0; + break; + case "AGE_RANGE_UNKNOWN": + case 1: + message.ageRange = 1; + break; + case "AGE_RANGE_18_24": + case 2: + message.ageRange = 2; + break; + case "AGE_RANGE_25_34": + case 3: + message.ageRange = 3; + break; + case "AGE_RANGE_35_44": + case 4: + message.ageRange = 4; + break; + case "AGE_RANGE_45_54": + case 5: + message.ageRange = 5; + break; + case "AGE_RANGE_55_64": + case 6: + message.ageRange = 6; + break; + case "AGE_RANGE_65_UP": + case 7: + message.ageRange = 7; + break; + } + switch (object.gender) { + default: + if (typeof object.gender === "number") { + message.gender = object.gender; + break; + } + break; + case "GENDER_UNSPECIFIED": + case 0: + message.gender = 0; + break; + case "GENDER_UNKNOWN": + case 1: + message.gender = 1; + break; + case "GENDER_MALE": + case 2: + message.gender = 2; + break; + case "GENDER_FEMALE": + case 3: + message.gender = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a MarketingDataInsightsAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute} message MarketingDataInsightsAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarketingDataInsightsAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userInterestId != null && message.hasOwnProperty("userInterestId")) { + if (typeof message.userInterestId === "number") + object.userInterestId = options.longs === String ? String(message.userInterestId) : message.userInterestId; + else + object.userInterestId = options.longs === String ? $util.Long.prototype.toString.call(message.userInterestId) : options.longs === Number ? new $util.LongBits(message.userInterestId.low >>> 0, message.userInterestId.high >>> 0).toNumber() : message.userInterestId; + if (options.oneofs) + object._userInterestId = "userInterestId"; + } + if (message.lift != null && message.hasOwnProperty("lift")) { + object.lift = options.json && !isFinite(message.lift) ? String(message.lift) : message.lift; + if (options.oneofs) + object._lift = "lift"; + } + if (message.ageRange != null && message.hasOwnProperty("ageRange")) { + object.ageRange = options.enums === String ? $root.google.ads.datamanager.v1.AgeRange[message.ageRange] === undefined ? message.ageRange : $root.google.ads.datamanager.v1.AgeRange[message.ageRange] : message.ageRange; + if (options.oneofs) + object._ageRange = "ageRange"; + } + if (message.gender != null && message.hasOwnProperty("gender")) { + object.gender = options.enums === String ? $root.google.ads.datamanager.v1.Gender[message.gender] === undefined ? message.gender : $root.google.ads.datamanager.v1.Gender[message.gender] : message.gender; + if (options.oneofs) + object._gender = "gender"; + } + return object; + }; + + /** + * Converts this MarketingDataInsightsAttribute to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @instance + * @returns {Object.} JSON object + */ + MarketingDataInsightsAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MarketingDataInsightsAttribute + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingDataInsightsAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute"; + }; + + return MarketingDataInsightsAttribute; + })(); + + return MarketingDataInsight; + })(); + + return RetrieveInsightsResponse; + })(); + + v1.PartnerLinkService = (function() { + + /** + * Constructs a new PartnerLinkService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerLinkService + * @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 PartnerLinkService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PartnerLinkService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PartnerLinkService; + + /** + * Creates new PartnerLinkService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @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 {PartnerLinkService} RPC service. Useful where requests and/or responses are streamed. + */ + PartnerLinkService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|createPartnerLink}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef CreatePartnerLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.PartnerLink} [response] PartnerLink + */ + + /** + * Calls CreatePartnerLink. + * @function createPartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLinkCallback} callback Node-style callback called with the error, if any, and PartnerLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.createPartnerLink = function createPartnerLink(request, callback) { + return this.rpcCall(createPartnerLink, $root.google.ads.datamanager.v1.CreatePartnerLinkRequest, $root.google.ads.datamanager.v1.PartnerLink, request, callback); + }, "name", { value: "CreatePartnerLink" }); + + /** + * Calls CreatePartnerLink. + * @function createPartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} request CreatePartnerLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|deletePartnerLink}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef DeletePartnerLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePartnerLink. + * @function deletePartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.deletePartnerLink = function deletePartnerLink(request, callback) { + return this.rpcCall(deletePartnerLink, $root.google.ads.datamanager.v1.DeletePartnerLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePartnerLink" }); + + /** + * Calls DeletePartnerLink. + * @function deletePartnerLink + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} request DeletePartnerLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.PartnerLinkService|searchPartnerLinks}. + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @typedef SearchPartnerLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} [response] SearchPartnerLinksResponse + */ + + /** + * Calls SearchPartnerLinks. + * @function searchPartnerLinks + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object + * @param {google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinksCallback} callback Node-style callback called with the error, if any, and SearchPartnerLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PartnerLinkService.prototype.searchPartnerLinks = function searchPartnerLinks(request, callback) { + return this.rpcCall(searchPartnerLinks, $root.google.ads.datamanager.v1.SearchPartnerLinksRequest, $root.google.ads.datamanager.v1.SearchPartnerLinksResponse, request, callback); + }, "name", { value: "SearchPartnerLinks" }); + + /** + * Calls SearchPartnerLinks. + * @function searchPartnerLinks + * @memberof google.ads.datamanager.v1.PartnerLinkService + * @instance + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} request SearchPartnerLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return PartnerLinkService; + })(); + + v1.CreatePartnerLinkRequest = (function() { + + /** + * Properties of a CreatePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreatePartnerLinkRequest + * @property {string|null} [parent] CreatePartnerLinkRequest parent + * @property {google.ads.datamanager.v1.IPartnerLink|null} [partnerLink] CreatePartnerLinkRequest partnerLink + */ + + /** + * Constructs a new CreatePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreatePartnerLinkRequest. + * @implements ICreatePartnerLinkRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set + */ + function CreatePartnerLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePartnerLinkRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + */ + CreatePartnerLinkRequest.prototype.parent = ""; + + /** + * CreatePartnerLinkRequest partnerLink. + * @member {google.ads.datamanager.v1.IPartnerLink|null|undefined} partnerLink + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + */ + CreatePartnerLinkRequest.prototype.partnerLink = null; + + /** + * Creates a new CreatePartnerLinkRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest instance + */ + CreatePartnerLinkRequest.create = function create(properties) { + return new CreatePartnerLinkRequest(properties); + }; + + /** + * Encodes the specified CreatePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartnerLinkRequest.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.partnerLink != null && Object.hasOwnProperty.call(message, "partnerLink")) + $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreatePartnerLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.ICreatePartnerLinkRequest} message CreatePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @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.CreatePartnerLinkRequest} CreatePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartnerLinkRequest.decode = function decode(reader, 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.CreatePartnerLinkRequest(); + 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.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePartnerLinkRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePartnerLinkRequest.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.partnerLink != null && message.hasOwnProperty("partnerLink")) { + var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLink); + if (error) + return "partnerLink." + error; + } + return null; + }; + + /** + * Creates a CreatePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreatePartnerLinkRequest} CreatePartnerLinkRequest + */ + CreatePartnerLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreatePartnerLinkRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreatePartnerLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.partnerLink != null) { + if (typeof object.partnerLink !== "object") + throw TypeError(".google.ads.datamanager.v1.CreatePartnerLinkRequest.partnerLink: object expected"); + message.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLink); + } + return message; + }; + + /** + * Creates a plain object from a CreatePartnerLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.CreatePartnerLinkRequest} message CreatePartnerLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePartnerLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.partnerLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.partnerLink != null && message.hasOwnProperty("partnerLink")) + object.partnerLink = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLink, options); + return object; + }; + + /** + * Converts this CreatePartnerLinkRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePartnerLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePartnerLinkRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreatePartnerLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreatePartnerLinkRequest"; + }; + + return CreatePartnerLinkRequest; + })(); + + v1.DeletePartnerLinkRequest = (function() { + + /** + * Properties of a DeletePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @interface IDeletePartnerLinkRequest + * @property {string|null} [name] DeletePartnerLinkRequest name + */ + + /** + * Constructs a new DeletePartnerLinkRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a DeletePartnerLinkRequest. + * @implements IDeletePartnerLinkRequest + * @constructor + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set + */ + function DeletePartnerLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePartnerLinkRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @instance + */ + DeletePartnerLinkRequest.prototype.name = ""; + + /** + * Creates a new DeletePartnerLinkRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest instance + */ + DeletePartnerLinkRequest.create = function create(properties) { + return new DeletePartnerLinkRequest(properties); + }; + + /** + * Encodes the specified DeletePartnerLinkRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeletePartnerLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.IDeletePartnerLinkRequest} message DeletePartnerLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartnerLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePartnerLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @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.DeletePartnerLinkRequest} DeletePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartnerLinkRequest.decode = function decode(reader, 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.DeletePartnerLinkRequest(); + 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 DeletePartnerLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartnerLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePartnerLinkRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.DeletePartnerLinkRequest} DeletePartnerLinkRequest + */ + DeletePartnerLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.DeletePartnerLinkRequest) + return object; + var message = new $root.google.ads.datamanager.v1.DeletePartnerLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePartnerLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {google.ads.datamanager.v1.DeletePartnerLinkRequest} message DeletePartnerLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePartnerLinkRequest.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 DeletePartnerLinkRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePartnerLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePartnerLinkRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.DeletePartnerLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePartnerLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.DeletePartnerLinkRequest"; + }; + + return DeletePartnerLinkRequest; + })(); + + v1.SearchPartnerLinksRequest = (function() { + + /** + * Properties of a SearchPartnerLinksRequest. + * @memberof google.ads.datamanager.v1 + * @interface ISearchPartnerLinksRequest + * @property {string|null} [parent] SearchPartnerLinksRequest parent + * @property {number|null} [pageSize] SearchPartnerLinksRequest pageSize + * @property {string|null} [pageToken] SearchPartnerLinksRequest pageToken + * @property {string|null} [filter] SearchPartnerLinksRequest filter + */ + + /** + * Constructs a new SearchPartnerLinksRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SearchPartnerLinksRequest. + * @implements ISearchPartnerLinksRequest + * @constructor + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set + */ + function SearchPartnerLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchPartnerLinksRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.parent = ""; + + /** + * SearchPartnerLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.pageSize = 0; + + /** + * SearchPartnerLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.pageToken = ""; + + /** + * SearchPartnerLinksRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + */ + SearchPartnerLinksRequest.prototype.filter = ""; + + /** + * Creates a new SearchPartnerLinksRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest instance + */ + SearchPartnerLinksRequest.create = function create(properties) { + return new SearchPartnerLinksRequest(properties); + }; + + /** + * Encodes the specified SearchPartnerLinksRequest message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksRequest.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); + return writer; + }; + + /** + * Encodes the specified SearchPartnerLinksRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksRequest} message SearchPartnerLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @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.SearchPartnerLinksRequest} SearchPartnerLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksRequest.decode = function decode(reader, 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.SearchPartnerLinksRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchPartnerLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchPartnerLinksRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchPartnerLinksRequest.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"; + return null; + }; + + /** + * Creates a SearchPartnerLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SearchPartnerLinksRequest} SearchPartnerLinksRequest + */ + SearchPartnerLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksRequest) + return object; + var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a SearchPartnerLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {google.ads.datamanager.v1.SearchPartnerLinksRequest} message SearchPartnerLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchPartnerLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this SearchPartnerLinksRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @instance + * @returns {Object.} JSON object + */ + SearchPartnerLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchPartnerLinksRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SearchPartnerLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchPartnerLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksRequest"; + }; + + return SearchPartnerLinksRequest; + })(); + + v1.SearchPartnerLinksResponse = (function() { + + /** + * Properties of a SearchPartnerLinksResponse. + * @memberof google.ads.datamanager.v1 + * @interface ISearchPartnerLinksResponse + * @property {Array.|null} [partnerLinks] SearchPartnerLinksResponse partnerLinks + * @property {string|null} [nextPageToken] SearchPartnerLinksResponse nextPageToken + */ + + /** + * Constructs a new SearchPartnerLinksResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SearchPartnerLinksResponse. + * @implements ISearchPartnerLinksResponse + * @constructor + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set + */ + function SearchPartnerLinksResponse(properties) { + this.partnerLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchPartnerLinksResponse partnerLinks. + * @member {Array.} partnerLinks + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + */ + SearchPartnerLinksResponse.prototype.partnerLinks = $util.emptyArray; + + /** + * SearchPartnerLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + */ + SearchPartnerLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchPartnerLinksResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse instance + */ + SearchPartnerLinksResponse.create = function create(properties) { + return new SearchPartnerLinksResponse(properties); + }; + + /** + * Encodes the specified SearchPartnerLinksResponse message. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partnerLinks != null && message.partnerLinks.length) + for (var i = 0; i < message.partnerLinks.length; ++i) + $root.google.ads.datamanager.v1.PartnerLink.encode(message.partnerLinks[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 SearchPartnerLinksResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SearchPartnerLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.ISearchPartnerLinksResponse} message SearchPartnerLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchPartnerLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @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.SearchPartnerLinksResponse} SearchPartnerLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksResponse.decode = function decode(reader, 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.SearchPartnerLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.partnerLinks && message.partnerLinks.length)) + message.partnerLinks = []; + message.partnerLinks.push($root.google.ads.datamanager.v1.PartnerLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchPartnerLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchPartnerLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchPartnerLinksResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchPartnerLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partnerLinks != null && message.hasOwnProperty("partnerLinks")) { + if (!Array.isArray(message.partnerLinks)) + return "partnerLinks: array expected"; + for (var i = 0; i < message.partnerLinks.length; ++i) { + var error = $root.google.ads.datamanager.v1.PartnerLink.verify(message.partnerLinks[i]); + if (error) + return "partnerLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchPartnerLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SearchPartnerLinksResponse} SearchPartnerLinksResponse + */ + SearchPartnerLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SearchPartnerLinksResponse) + return object; + var message = new $root.google.ads.datamanager.v1.SearchPartnerLinksResponse(); + if (object.partnerLinks) { + if (!Array.isArray(object.partnerLinks)) + throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: array expected"); + message.partnerLinks = []; + for (var i = 0; i < object.partnerLinks.length; ++i) { + if (typeof object.partnerLinks[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.SearchPartnerLinksResponse.partnerLinks: object expected"); + message.partnerLinks[i] = $root.google.ads.datamanager.v1.PartnerLink.fromObject(object.partnerLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchPartnerLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {google.ads.datamanager.v1.SearchPartnerLinksResponse} message SearchPartnerLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchPartnerLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partnerLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partnerLinks && message.partnerLinks.length) { + object.partnerLinks = []; + for (var j = 0; j < message.partnerLinks.length; ++j) + object.partnerLinks[j] = $root.google.ads.datamanager.v1.PartnerLink.toObject(message.partnerLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchPartnerLinksResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @instance + * @returns {Object.} JSON object + */ + SearchPartnerLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchPartnerLinksResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SearchPartnerLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchPartnerLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SearchPartnerLinksResponse"; + }; + + return SearchPartnerLinksResponse; + })(); + + v1.PartnerLink = (function() { + + /** + * Properties of a PartnerLink. + * @memberof google.ads.datamanager.v1 + * @interface IPartnerLink + * @property {string|null} [name] PartnerLink name + * @property {string|null} [partnerLinkId] PartnerLink partnerLinkId + * @property {google.ads.datamanager.v1.IProductAccount|null} [owningAccount] PartnerLink owningAccount + * @property {google.ads.datamanager.v1.IProductAccount|null} [partnerAccount] PartnerLink partnerAccount + */ + + /** + * Constructs a new PartnerLink. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerLink. + * @implements IPartnerLink + * @constructor + * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set + */ + function PartnerLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartnerLink name. + * @member {string} name + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.name = ""; + + /** + * PartnerLink partnerLinkId. + * @member {string} partnerLinkId + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.partnerLinkId = ""; + + /** + * PartnerLink owningAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} owningAccount + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.owningAccount = null; + + /** + * PartnerLink partnerAccount. + * @member {google.ads.datamanager.v1.IProductAccount|null|undefined} partnerAccount + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + */ + PartnerLink.prototype.partnerAccount = null; + + /** + * Creates a new PartnerLink instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink instance + */ + PartnerLink.create = function create(properties) { + return new PartnerLink(properties); + }; + + /** + * Encodes the specified PartnerLink message. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerLink.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.partnerLinkId != null && Object.hasOwnProperty.call(message, "partnerLinkId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.partnerLinkId); + if (message.owningAccount != null && Object.hasOwnProperty.call(message, "owningAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.owningAccount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partnerAccount != null && Object.hasOwnProperty.call(message, "partnerAccount")) + $root.google.ads.datamanager.v1.ProductAccount.encode(message.partnerAccount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartnerLink message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.IPartnerLink} message PartnerLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartnerLink message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PartnerLink + * @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.PartnerLink} PartnerLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerLink.decode = function decode(reader, 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.PartnerLink(); + 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.partnerLinkId = reader.string(); + break; + } + case 3: { + message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + case 4: { + message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartnerLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartnerLink message. + * @function verify + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartnerLink.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.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) + if (!$util.isString(message.partnerLinkId)) + return "partnerLinkId: string expected"; + if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.owningAccount); + if (error) + return "owningAccount." + error; + } + if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) { + var error = $root.google.ads.datamanager.v1.ProductAccount.verify(message.partnerAccount); + if (error) + return "partnerAccount." + error; + } + return null; + }; + + /** + * Creates a PartnerLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PartnerLink} PartnerLink + */ + PartnerLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PartnerLink) + return object; + var message = new $root.google.ads.datamanager.v1.PartnerLink(); + if (object.name != null) + message.name = String(object.name); + if (object.partnerLinkId != null) + message.partnerLinkId = String(object.partnerLinkId); + if (object.owningAccount != null) { + if (typeof object.owningAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.PartnerLink.owningAccount: object expected"); + message.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.owningAccount); + } + if (object.partnerAccount != null) { + if (typeof object.partnerAccount !== "object") + throw TypeError(".google.ads.datamanager.v1.PartnerLink.partnerAccount: object expected"); + message.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.fromObject(object.partnerAccount); + } + return message; + }; + + /** + * Creates a plain object from a PartnerLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {google.ads.datamanager.v1.PartnerLink} message PartnerLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartnerLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.partnerLinkId = ""; + object.owningAccount = null; + object.partnerAccount = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.partnerLinkId != null && message.hasOwnProperty("partnerLinkId")) + object.partnerLinkId = message.partnerLinkId; + if (message.owningAccount != null && message.hasOwnProperty("owningAccount")) + object.owningAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.owningAccount, options); + if (message.partnerAccount != null && message.hasOwnProperty("partnerAccount")) + object.partnerAccount = $root.google.ads.datamanager.v1.ProductAccount.toObject(message.partnerAccount, options); + return object; + }; + + /** + * Converts this PartnerLink to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PartnerLink + * @instance + * @returns {Object.} JSON object + */ + PartnerLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartnerLink + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PartnerLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartnerLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerLink"; + }; + + return PartnerLink; + })(); + + v1.UserList = (function() { + + /** + * Properties of a UserList. + * @memberof google.ads.datamanager.v1 + * @interface IUserList + * @property {string|null} [name] UserList name + * @property {number|Long|null} [id] UserList id + * @property {boolean|null} [readOnly] UserList readOnly + * @property {string|null} [displayName] UserList displayName + * @property {string|null} [description] UserList description + * @property {google.ads.datamanager.v1.UserList.MembershipStatus|null} [membershipStatus] UserList membershipStatus + * @property {string|null} [integrationCode] UserList integrationCode + * @property {google.protobuf.IDuration|null} [membershipDuration] UserList membershipDuration + * @property {google.ads.datamanager.v1.UserList.ClosingReason|null} [closingReason] UserList closingReason + * @property {google.ads.datamanager.v1.UserList.AccessReason|null} [accessReason] UserList accessReason + * @property {google.ads.datamanager.v1.UserList.AccessStatus|null} [accountAccessStatus] UserList accountAccessStatus + * @property {google.ads.datamanager.v1.ISizeInfo|null} [sizeInfo] UserList sizeInfo + * @property {google.ads.datamanager.v1.ITargetNetworkInfo|null} [targetNetworkInfo] UserList targetNetworkInfo + * @property {google.ads.datamanager.v1.IIngestedUserListInfo|null} [ingestedUserListInfo] UserList ingestedUserListInfo + */ + + /** + * Constructs a new UserList. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserList. + * @implements IUserList + * @constructor + * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set + */ + function UserList(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserList name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.name = ""; + + /** + * UserList id. + * @member {number|Long} id + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserList readOnly. + * @member {boolean} readOnly + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.readOnly = false; + + /** + * UserList displayName. + * @member {string|null|undefined} displayName + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.displayName = null; + + /** + * UserList description. + * @member {string|null|undefined} description + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.description = null; + + /** + * UserList membershipStatus. + * @member {google.ads.datamanager.v1.UserList.MembershipStatus|null|undefined} membershipStatus + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.membershipStatus = null; + + /** + * UserList integrationCode. + * @member {string|null|undefined} integrationCode + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.integrationCode = null; + + /** + * UserList membershipDuration. + * @member {google.protobuf.IDuration|null|undefined} membershipDuration + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.membershipDuration = null; + + /** + * UserList closingReason. + * @member {google.ads.datamanager.v1.UserList.ClosingReason|null|undefined} closingReason + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.closingReason = null; + + /** + * UserList accessReason. + * @member {google.ads.datamanager.v1.UserList.AccessReason} accessReason + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.accessReason = 0; + + /** + * UserList accountAccessStatus. + * @member {google.ads.datamanager.v1.UserList.AccessStatus|null|undefined} accountAccessStatus + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.accountAccessStatus = null; + + /** + * UserList sizeInfo. + * @member {google.ads.datamanager.v1.ISizeInfo|null|undefined} sizeInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.sizeInfo = null; + + /** + * UserList targetNetworkInfo. + * @member {google.ads.datamanager.v1.ITargetNetworkInfo|null|undefined} targetNetworkInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.targetNetworkInfo = null; + + /** + * UserList ingestedUserListInfo. + * @member {google.ads.datamanager.v1.IIngestedUserListInfo|null|undefined} ingestedUserListInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + UserList.prototype.ingestedUserListInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_membershipStatus", { + get: $util.oneOfGetter($oneOfFields = ["membershipStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_integrationCode", { + get: $util.oneOfGetter($oneOfFields = ["integrationCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_closingReason", { + get: $util.oneOfGetter($oneOfFields = ["closingReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserList.prototype, "_accountAccessStatus", { + get: $util.oneOfGetter($oneOfFields = ["accountAccessStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UserList userListInfo. + * @member {"ingestedUserListInfo"|undefined} userListInfo + * @memberof google.ads.datamanager.v1.UserList + * @instance + */ + Object.defineProperty(UserList.prototype, "userListInfo", { + get: $util.oneOfGetter($oneOfFields = ["ingestedUserListInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserList instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserList} UserList instance + */ + UserList.create = function create(properties) { + return new UserList(properties); + }; + + /** + * Encodes the specified UserList message. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserList.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); + if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.readOnly); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.membershipStatus != null && Object.hasOwnProperty.call(message, "membershipStatus")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.membershipStatus); + if (message.integrationCode != null && Object.hasOwnProperty.call(message, "integrationCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.integrationCode); + if (message.membershipDuration != null && Object.hasOwnProperty.call(message, "membershipDuration")) + $root.google.protobuf.Duration.encode(message.membershipDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.closingReason != null && Object.hasOwnProperty.call(message, "closingReason")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.closingReason); + if (message.accessReason != null && Object.hasOwnProperty.call(message, "accessReason")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.accessReason); + if (message.accountAccessStatus != null && Object.hasOwnProperty.call(message, "accountAccessStatus")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.accountAccessStatus); + if (message.sizeInfo != null && Object.hasOwnProperty.call(message, "sizeInfo")) + $root.google.ads.datamanager.v1.SizeInfo.encode(message.sizeInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.targetNetworkInfo != null && Object.hasOwnProperty.call(message, "targetNetworkInfo")) + $root.google.ads.datamanager.v1.TargetNetworkInfo.encode(message.targetNetworkInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.ingestedUserListInfo != null && Object.hasOwnProperty.call(message, "ingestedUserListInfo")) + $root.google.ads.datamanager.v1.IngestedUserListInfo.encode(message.ingestedUserListInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserList message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.IUserList} message UserList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserList message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserList + * @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.UserList} UserList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserList.decode = function decode(reader, 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.UserList(); + 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.id = reader.int64(); + break; + } + case 3: { + message.readOnly = reader.bool(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.membershipStatus = reader.int32(); + break; + } + case 7: { + message.integrationCode = reader.string(); + break; + } + case 8: { + message.membershipDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.closingReason = reader.int32(); + break; + } + case 10: { + message.accessReason = reader.int32(); + break; + } + case 11: { + message.accountAccessStatus = reader.int32(); + break; + } + case 12: { + message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserList} UserList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserList message. + * @function verify + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserList.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.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + if (typeof message.readOnly !== "boolean") + return "readOnly: boolean 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { + properties._membershipStatus = 1; + switch (message.membershipStatus) { + default: + return "membershipStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { + properties._integrationCode = 1; + if (!$util.isString(message.integrationCode)) + return "integrationCode: string expected"; + } + if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) { + var error = $root.google.protobuf.Duration.verify(message.membershipDuration); + if (error) + return "membershipDuration." + error; + } + if (message.closingReason != null && message.hasOwnProperty("closingReason")) { + properties._closingReason = 1; + switch (message.closingReason) { + default: + return "closingReason: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.accessReason != null && message.hasOwnProperty("accessReason")) + switch (message.accessReason) { + default: + return "accessReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { + properties._accountAccessStatus = 1; + switch (message.accountAccessStatus) { + default: + return "accountAccessStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) { + var error = $root.google.ads.datamanager.v1.SizeInfo.verify(message.sizeInfo); + if (error) + return "sizeInfo." + error; + } + if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) { + var error = $root.google.ads.datamanager.v1.TargetNetworkInfo.verify(message.targetNetworkInfo); + if (error) + return "targetNetworkInfo." + error; + } + if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { + properties.userListInfo = 1; + { + var error = $root.google.ads.datamanager.v1.IngestedUserListInfo.verify(message.ingestedUserListInfo); + if (error) + return "ingestedUserListInfo." + error; + } + } + return null; + }; + + /** + * Creates a UserList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserList} UserList + */ + UserList.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserList) + return object; + var message = new $root.google.ads.datamanager.v1.UserList(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.readOnly != null) + message.readOnly = Boolean(object.readOnly); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.membershipStatus) { + default: + if (typeof object.membershipStatus === "number") { + message.membershipStatus = object.membershipStatus; + break; + } + break; + case "MEMBERSHIP_STATUS_UNSPECIFIED": + case 0: + message.membershipStatus = 0; + break; + case "OPEN": + case 1: + message.membershipStatus = 1; + break; + case "CLOSED": + case 2: + message.membershipStatus = 2; + break; + } + if (object.integrationCode != null) + message.integrationCode = String(object.integrationCode); + if (object.membershipDuration != null) { + if (typeof object.membershipDuration !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.membershipDuration: object expected"); + message.membershipDuration = $root.google.protobuf.Duration.fromObject(object.membershipDuration); + } + switch (object.closingReason) { + default: + if (typeof object.closingReason === "number") { + message.closingReason = object.closingReason; + break; + } + break; + case "CLOSING_REASON_UNSPECIFIED": + case 0: + message.closingReason = 0; + break; + case "UNUSED": + case 1: + message.closingReason = 1; + break; + } + switch (object.accessReason) { + default: + if (typeof object.accessReason === "number") { + message.accessReason = object.accessReason; + break; + } + break; + case "ACCESS_REASON_UNSPECIFIED": + case 0: + message.accessReason = 0; + break; + case "OWNED": + case 1: + message.accessReason = 1; + break; + case "SHARED": + case 2: + message.accessReason = 2; + break; + case "LICENSED": + case 3: + message.accessReason = 3; + break; + case "SUBSCRIBED": + case 4: + message.accessReason = 4; + break; + case "AFFILIATED": + case 5: + message.accessReason = 5; + break; + } + switch (object.accountAccessStatus) { + default: + if (typeof object.accountAccessStatus === "number") { + message.accountAccessStatus = object.accountAccessStatus; + break; + } + break; + case "ACCESS_STATUS_UNSPECIFIED": + case 0: + message.accountAccessStatus = 0; + break; + case "ENABLED": + case 1: + message.accountAccessStatus = 1; + break; + case "DISABLED": + case 2: + message.accountAccessStatus = 2; + break; + } + if (object.sizeInfo != null) { + if (typeof object.sizeInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.sizeInfo: object expected"); + message.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.fromObject(object.sizeInfo); + } + if (object.targetNetworkInfo != null) { + if (typeof object.targetNetworkInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.targetNetworkInfo: object expected"); + message.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.fromObject(object.targetNetworkInfo); + } + if (object.ingestedUserListInfo != null) { + if (typeof object.ingestedUserListInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.UserList.ingestedUserListInfo: object expected"); + message.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.fromObject(object.ingestedUserListInfo); + } + return message; + }; + + /** + * Creates a plain object from a UserList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {google.ads.datamanager.v1.UserList} message UserList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserList.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.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + object.readOnly = false; + object.membershipDuration = null; + object.accessReason = options.enums === String ? "ACCESS_REASON_UNSPECIFIED" : 0; + object.sizeInfo = null; + object.targetNetworkInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + object.readOnly = message.readOnly; + 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.membershipStatus != null && message.hasOwnProperty("membershipStatus")) { + object.membershipStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] === undefined ? message.membershipStatus : $root.google.ads.datamanager.v1.UserList.MembershipStatus[message.membershipStatus] : message.membershipStatus; + if (options.oneofs) + object._membershipStatus = "membershipStatus"; + } + if (message.integrationCode != null && message.hasOwnProperty("integrationCode")) { + object.integrationCode = message.integrationCode; + if (options.oneofs) + object._integrationCode = "integrationCode"; + } + if (message.membershipDuration != null && message.hasOwnProperty("membershipDuration")) + object.membershipDuration = $root.google.protobuf.Duration.toObject(message.membershipDuration, options); + if (message.closingReason != null && message.hasOwnProperty("closingReason")) { + object.closingReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] === undefined ? message.closingReason : $root.google.ads.datamanager.v1.UserList.ClosingReason[message.closingReason] : message.closingReason; + if (options.oneofs) + object._closingReason = "closingReason"; + } + if (message.accessReason != null && message.hasOwnProperty("accessReason")) + object.accessReason = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] === undefined ? message.accessReason : $root.google.ads.datamanager.v1.UserList.AccessReason[message.accessReason] : message.accessReason; + if (message.accountAccessStatus != null && message.hasOwnProperty("accountAccessStatus")) { + object.accountAccessStatus = options.enums === String ? $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] === undefined ? message.accountAccessStatus : $root.google.ads.datamanager.v1.UserList.AccessStatus[message.accountAccessStatus] : message.accountAccessStatus; + if (options.oneofs) + object._accountAccessStatus = "accountAccessStatus"; + } + if (message.sizeInfo != null && message.hasOwnProperty("sizeInfo")) + object.sizeInfo = $root.google.ads.datamanager.v1.SizeInfo.toObject(message.sizeInfo, options); + if (message.targetNetworkInfo != null && message.hasOwnProperty("targetNetworkInfo")) + object.targetNetworkInfo = $root.google.ads.datamanager.v1.TargetNetworkInfo.toObject(message.targetNetworkInfo, options); + if (message.ingestedUserListInfo != null && message.hasOwnProperty("ingestedUserListInfo")) { + object.ingestedUserListInfo = $root.google.ads.datamanager.v1.IngestedUserListInfo.toObject(message.ingestedUserListInfo, options); + if (options.oneofs) + object.userListInfo = "ingestedUserListInfo"; + } + return object; + }; + + /** + * Converts this UserList to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserList + * @instance + * @returns {Object.} JSON object + */ + UserList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserList + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserList"; + }; + + /** + * MembershipStatus enum. + * @name google.ads.datamanager.v1.UserList.MembershipStatus + * @enum {number} + * @property {number} MEMBERSHIP_STATUS_UNSPECIFIED=0 MEMBERSHIP_STATUS_UNSPECIFIED value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + UserList.MembershipStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEMBERSHIP_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * ClosingReason enum. + * @name google.ads.datamanager.v1.UserList.ClosingReason + * @enum {number} + * @property {number} CLOSING_REASON_UNSPECIFIED=0 CLOSING_REASON_UNSPECIFIED value + * @property {number} UNUSED=1 UNUSED value + */ + UserList.ClosingReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOSING_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNUSED"] = 1; + return values; + })(); + + /** + * AccessReason enum. + * @name google.ads.datamanager.v1.UserList.AccessReason + * @enum {number} + * @property {number} ACCESS_REASON_UNSPECIFIED=0 ACCESS_REASON_UNSPECIFIED value + * @property {number} OWNED=1 OWNED value + * @property {number} SHARED=2 SHARED value + * @property {number} LICENSED=3 LICENSED value + * @property {number} SUBSCRIBED=4 SUBSCRIBED value + * @property {number} AFFILIATED=5 AFFILIATED value + */ + UserList.AccessReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "OWNED"] = 1; + values[valuesById[2] = "SHARED"] = 2; + values[valuesById[3] = "LICENSED"] = 3; + values[valuesById[4] = "SUBSCRIBED"] = 4; + values[valuesById[5] = "AFFILIATED"] = 5; + return values; + })(); + + /** + * AccessStatus enum. + * @name google.ads.datamanager.v1.UserList.AccessStatus + * @enum {number} + * @property {number} ACCESS_STATUS_UNSPECIFIED=0 ACCESS_STATUS_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + UserList.AccessStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + return UserList; + })(); + + v1.SizeInfo = (function() { + + /** + * Properties of a SizeInfo. + * @memberof google.ads.datamanager.v1 + * @interface ISizeInfo + * @property {number|Long|null} [displayNetworkMembersCount] SizeInfo displayNetworkMembersCount + * @property {number|Long|null} [searchNetworkMembersCount] SizeInfo searchNetworkMembersCount + */ + + /** + * Constructs a new SizeInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a SizeInfo. + * @implements ISizeInfo + * @constructor + * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set + */ + function SizeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SizeInfo displayNetworkMembersCount. + * @member {number|Long} displayNetworkMembersCount + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + */ + SizeInfo.prototype.displayNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SizeInfo searchNetworkMembersCount. + * @member {number|Long} searchNetworkMembersCount + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + */ + SizeInfo.prototype.searchNetworkMembersCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SizeInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo instance + */ + SizeInfo.create = function create(properties) { + return new SizeInfo(properties); + }; + + /** + * Encodes the specified SizeInfo message. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SizeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayNetworkMembersCount != null && Object.hasOwnProperty.call(message, "displayNetworkMembersCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.displayNetworkMembersCount); + if (message.searchNetworkMembersCount != null && Object.hasOwnProperty.call(message, "searchNetworkMembersCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.searchNetworkMembersCount); + return writer; + }; + + /** + * Encodes the specified SizeInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.SizeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.ISizeInfo} message SizeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SizeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SizeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.SizeInfo + * @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.SizeInfo} SizeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SizeInfo.decode = function decode(reader, 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.SizeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayNetworkMembersCount = reader.int64(); + break; + } + case 2: { + message.searchNetworkMembersCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SizeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SizeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SizeInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SizeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) + if (!$util.isInteger(message.displayNetworkMembersCount) && !(message.displayNetworkMembersCount && $util.isInteger(message.displayNetworkMembersCount.low) && $util.isInteger(message.displayNetworkMembersCount.high))) + return "displayNetworkMembersCount: integer|Long expected"; + if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) + if (!$util.isInteger(message.searchNetworkMembersCount) && !(message.searchNetworkMembersCount && $util.isInteger(message.searchNetworkMembersCount.low) && $util.isInteger(message.searchNetworkMembersCount.high))) + return "searchNetworkMembersCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SizeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.SizeInfo} SizeInfo + */ + SizeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.SizeInfo) + return object; + var message = new $root.google.ads.datamanager.v1.SizeInfo(); + if (object.displayNetworkMembersCount != null) + if ($util.Long) + (message.displayNetworkMembersCount = $util.Long.fromValue(object.displayNetworkMembersCount)).unsigned = false; + else if (typeof object.displayNetworkMembersCount === "string") + message.displayNetworkMembersCount = parseInt(object.displayNetworkMembersCount, 10); + else if (typeof object.displayNetworkMembersCount === "number") + message.displayNetworkMembersCount = object.displayNetworkMembersCount; + else if (typeof object.displayNetworkMembersCount === "object") + message.displayNetworkMembersCount = new $util.LongBits(object.displayNetworkMembersCount.low >>> 0, object.displayNetworkMembersCount.high >>> 0).toNumber(); + if (object.searchNetworkMembersCount != null) + if ($util.Long) + (message.searchNetworkMembersCount = $util.Long.fromValue(object.searchNetworkMembersCount)).unsigned = false; + else if (typeof object.searchNetworkMembersCount === "string") + message.searchNetworkMembersCount = parseInt(object.searchNetworkMembersCount, 10); + else if (typeof object.searchNetworkMembersCount === "number") + message.searchNetworkMembersCount = object.searchNetworkMembersCount; + else if (typeof object.searchNetworkMembersCount === "object") + message.searchNetworkMembersCount = new $util.LongBits(object.searchNetworkMembersCount.low >>> 0, object.searchNetworkMembersCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SizeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {google.ads.datamanager.v1.SizeInfo} message SizeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SizeInfo.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.displayNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.displayNetworkMembersCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.searchNetworkMembersCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.searchNetworkMembersCount = options.longs === String ? "0" : 0; + } + if (message.displayNetworkMembersCount != null && message.hasOwnProperty("displayNetworkMembersCount")) + if (typeof message.displayNetworkMembersCount === "number") + object.displayNetworkMembersCount = options.longs === String ? String(message.displayNetworkMembersCount) : message.displayNetworkMembersCount; + else + object.displayNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.displayNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.displayNetworkMembersCount.low >>> 0, message.displayNetworkMembersCount.high >>> 0).toNumber() : message.displayNetworkMembersCount; + if (message.searchNetworkMembersCount != null && message.hasOwnProperty("searchNetworkMembersCount")) + if (typeof message.searchNetworkMembersCount === "number") + object.searchNetworkMembersCount = options.longs === String ? String(message.searchNetworkMembersCount) : message.searchNetworkMembersCount; + else + object.searchNetworkMembersCount = options.longs === String ? $util.Long.prototype.toString.call(message.searchNetworkMembersCount) : options.longs === Number ? new $util.LongBits(message.searchNetworkMembersCount.low >>> 0, message.searchNetworkMembersCount.high >>> 0).toNumber() : message.searchNetworkMembersCount; + return object; + }; + + /** + * Converts this SizeInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.SizeInfo + * @instance + * @returns {Object.} JSON object + */ + SizeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SizeInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.SizeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SizeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.SizeInfo"; + }; + + return SizeInfo; + })(); + + v1.TargetNetworkInfo = (function() { + + /** + * Properties of a TargetNetworkInfo. + * @memberof google.ads.datamanager.v1 + * @interface ITargetNetworkInfo + * @property {boolean|null} [eligibleForDisplay] TargetNetworkInfo eligibleForDisplay + * @property {boolean|null} [eligibleForSearch] TargetNetworkInfo eligibleForSearch + */ + + /** + * Constructs a new TargetNetworkInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a TargetNetworkInfo. + * @implements ITargetNetworkInfo + * @constructor + * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set + */ + function TargetNetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetNetworkInfo eligibleForDisplay. + * @member {boolean} eligibleForDisplay + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + */ + TargetNetworkInfo.prototype.eligibleForDisplay = false; + + /** + * TargetNetworkInfo eligibleForSearch. + * @member {boolean|null|undefined} eligibleForSearch + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + */ + TargetNetworkInfo.prototype.eligibleForSearch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TargetNetworkInfo.prototype, "_eligibleForSearch", { + get: $util.oneOfGetter($oneOfFields = ["eligibleForSearch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetNetworkInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo instance + */ + TargetNetworkInfo.create = function create(properties) { + return new TargetNetworkInfo(properties); + }; + + /** + * Encodes the specified TargetNetworkInfo message. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eligibleForDisplay != null && Object.hasOwnProperty.call(message, "eligibleForDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.eligibleForDisplay); + if (message.eligibleForSearch != null && Object.hasOwnProperty.call(message, "eligibleForSearch")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.eligibleForSearch); + return writer; + }; + + /** + * Encodes the specified TargetNetworkInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TargetNetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.ITargetNetworkInfo} message TargetNetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @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.TargetNetworkInfo} TargetNetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNetworkInfo.decode = function decode(reader, 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.TargetNetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eligibleForDisplay = reader.bool(); + break; + } + case 2: { + message.eligibleForSearch = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetNetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetNetworkInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetNetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) + if (typeof message.eligibleForDisplay !== "boolean") + return "eligibleForDisplay: boolean expected"; + if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { + properties._eligibleForSearch = 1; + if (typeof message.eligibleForSearch !== "boolean") + return "eligibleForSearch: boolean expected"; + } + return null; + }; + + /** + * Creates a TargetNetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.TargetNetworkInfo} TargetNetworkInfo + */ + TargetNetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.TargetNetworkInfo) + return object; + var message = new $root.google.ads.datamanager.v1.TargetNetworkInfo(); + if (object.eligibleForDisplay != null) + message.eligibleForDisplay = Boolean(object.eligibleForDisplay); + if (object.eligibleForSearch != null) + message.eligibleForSearch = Boolean(object.eligibleForSearch); + return message; + }; + + /** + * Creates a plain object from a TargetNetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {google.ads.datamanager.v1.TargetNetworkInfo} message TargetNetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetNetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.eligibleForDisplay = false; + if (message.eligibleForDisplay != null && message.hasOwnProperty("eligibleForDisplay")) + object.eligibleForDisplay = message.eligibleForDisplay; + if (message.eligibleForSearch != null && message.hasOwnProperty("eligibleForSearch")) { + object.eligibleForSearch = message.eligibleForSearch; + if (options.oneofs) + object._eligibleForSearch = "eligibleForSearch"; + } + return object; + }; + + /** + * Converts this TargetNetworkInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @instance + * @returns {Object.} JSON object + */ + TargetNetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetNetworkInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.TargetNetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetNetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.TargetNetworkInfo"; + }; + + return TargetNetworkInfo; + })(); + + v1.IngestedUserListInfo = (function() { + + /** + * Properties of an IngestedUserListInfo. + * @memberof google.ads.datamanager.v1 + * @interface IIngestedUserListInfo + * @property {Array.|null} [uploadKeyTypes] IngestedUserListInfo uploadKeyTypes + * @property {google.ads.datamanager.v1.IContactIdInfo|null} [contactIdInfo] IngestedUserListInfo contactIdInfo + * @property {google.ads.datamanager.v1.IMobileIdInfo|null} [mobileIdInfo] IngestedUserListInfo mobileIdInfo + * @property {google.ads.datamanager.v1.IUserIdInfo|null} [userIdInfo] IngestedUserListInfo userIdInfo + * @property {google.ads.datamanager.v1.IPairIdInfo|null} [pairIdInfo] IngestedUserListInfo pairIdInfo + * @property {google.ads.datamanager.v1.IPseudonymousIdInfo|null} [pseudonymousIdInfo] IngestedUserListInfo pseudonymousIdInfo + * @property {google.ads.datamanager.v1.IPartnerAudienceInfo|null} [partnerAudienceInfo] IngestedUserListInfo partnerAudienceInfo + */ + + /** + * Constructs a new IngestedUserListInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an IngestedUserListInfo. + * @implements IIngestedUserListInfo + * @constructor + * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set + */ + function IngestedUserListInfo(properties) { + this.uploadKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestedUserListInfo uploadKeyTypes. + * @member {Array.} uploadKeyTypes + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.uploadKeyTypes = $util.emptyArray; + + /** + * IngestedUserListInfo contactIdInfo. + * @member {google.ads.datamanager.v1.IContactIdInfo|null|undefined} contactIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.contactIdInfo = null; + + /** + * IngestedUserListInfo mobileIdInfo. + * @member {google.ads.datamanager.v1.IMobileIdInfo|null|undefined} mobileIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.mobileIdInfo = null; + + /** + * IngestedUserListInfo userIdInfo. + * @member {google.ads.datamanager.v1.IUserIdInfo|null|undefined} userIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.userIdInfo = null; + + /** + * IngestedUserListInfo pairIdInfo. + * @member {google.ads.datamanager.v1.IPairIdInfo|null|undefined} pairIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.pairIdInfo = null; + + /** + * IngestedUserListInfo pseudonymousIdInfo. + * @member {google.ads.datamanager.v1.IPseudonymousIdInfo|null|undefined} pseudonymousIdInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.pseudonymousIdInfo = null; + + /** + * IngestedUserListInfo partnerAudienceInfo. + * @member {google.ads.datamanager.v1.IPartnerAudienceInfo|null|undefined} partnerAudienceInfo + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + */ + IngestedUserListInfo.prototype.partnerAudienceInfo = null; + + /** + * Creates a new IngestedUserListInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo instance + */ + IngestedUserListInfo.create = function create(properties) { + return new IngestedUserListInfo(properties); + }; + + /** + * Encodes the specified IngestedUserListInfo message. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestedUserListInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uploadKeyTypes != null && message.uploadKeyTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.uploadKeyTypes.length; ++i) + writer.int32(message.uploadKeyTypes[i]); + writer.ldelim(); + } + if (message.contactIdInfo != null && Object.hasOwnProperty.call(message, "contactIdInfo")) + $root.google.ads.datamanager.v1.ContactIdInfo.encode(message.contactIdInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mobileIdInfo != null && Object.hasOwnProperty.call(message, "mobileIdInfo")) + $root.google.ads.datamanager.v1.MobileIdInfo.encode(message.mobileIdInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.userIdInfo != null && Object.hasOwnProperty.call(message, "userIdInfo")) + $root.google.ads.datamanager.v1.UserIdInfo.encode(message.userIdInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pairIdInfo != null && Object.hasOwnProperty.call(message, "pairIdInfo")) + $root.google.ads.datamanager.v1.PairIdInfo.encode(message.pairIdInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pseudonymousIdInfo != null && Object.hasOwnProperty.call(message, "pseudonymousIdInfo")) + $root.google.ads.datamanager.v1.PseudonymousIdInfo.encode(message.pseudonymousIdInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.partnerAudienceInfo != null && Object.hasOwnProperty.call(message, "partnerAudienceInfo")) + $root.google.ads.datamanager.v1.PartnerAudienceInfo.encode(message.partnerAudienceInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestedUserListInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.IngestedUserListInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IIngestedUserListInfo} message IngestedUserListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestedUserListInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @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.IngestedUserListInfo} IngestedUserListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestedUserListInfo.decode = function decode(reader, 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.IngestedUserListInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.uploadKeyTypes && message.uploadKeyTypes.length)) + message.uploadKeyTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.uploadKeyTypes.push(reader.int32()); + } else + message.uploadKeyTypes.push(reader.int32()); + break; + } + case 2: { + message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestedUserListInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestedUserListInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestedUserListInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestedUserListInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uploadKeyTypes != null && message.hasOwnProperty("uploadKeyTypes")) { + if (!Array.isArray(message.uploadKeyTypes)) + return "uploadKeyTypes: array expected"; + for (var i = 0; i < message.uploadKeyTypes.length; ++i) + switch (message.uploadKeyTypes[i]) { + default: + return "uploadKeyTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) { + var error = $root.google.ads.datamanager.v1.ContactIdInfo.verify(message.contactIdInfo); + if (error) + return "contactIdInfo." + error; + } + if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) { + var error = $root.google.ads.datamanager.v1.MobileIdInfo.verify(message.mobileIdInfo); + if (error) + return "mobileIdInfo." + error; + } + if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) { + var error = $root.google.ads.datamanager.v1.UserIdInfo.verify(message.userIdInfo); + if (error) + return "userIdInfo." + error; + } + if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) { + var error = $root.google.ads.datamanager.v1.PairIdInfo.verify(message.pairIdInfo); + if (error) + return "pairIdInfo." + error; + } + if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) { + var error = $root.google.ads.datamanager.v1.PseudonymousIdInfo.verify(message.pseudonymousIdInfo); + if (error) + return "pseudonymousIdInfo." + error; + } + if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) { + var error = $root.google.ads.datamanager.v1.PartnerAudienceInfo.verify(message.partnerAudienceInfo); + if (error) + return "partnerAudienceInfo." + error; + } + return null; + }; + + /** + * Creates an IngestedUserListInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.IngestedUserListInfo} IngestedUserListInfo + */ + IngestedUserListInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.IngestedUserListInfo) + return object; + var message = new $root.google.ads.datamanager.v1.IngestedUserListInfo(); + if (object.uploadKeyTypes) { + if (!Array.isArray(object.uploadKeyTypes)) + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.uploadKeyTypes: array expected"); + message.uploadKeyTypes = []; + for (var i = 0; i < object.uploadKeyTypes.length; ++i) + switch (object.uploadKeyTypes[i]) { + default: + if (typeof object.uploadKeyTypes[i] === "number") { + message.uploadKeyTypes[i] = object.uploadKeyTypes[i]; + break; + } + case "UPLOAD_KEY_TYPE_UNSPECIFIED": + case 0: + message.uploadKeyTypes[i] = 0; + break; + case "CONTACT_ID": + case 1: + message.uploadKeyTypes[i] = 1; + break; + case "MOBILE_ID": + case 2: + message.uploadKeyTypes[i] = 2; + break; + case "USER_ID": + case 3: + message.uploadKeyTypes[i] = 3; + break; + case "PAIR_ID": + case 4: + message.uploadKeyTypes[i] = 4; + break; + case "PSEUDONYMOUS_ID": + case 5: + message.uploadKeyTypes[i] = 5; + break; + } + } + if (object.contactIdInfo != null) { + if (typeof object.contactIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.contactIdInfo: object expected"); + message.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.fromObject(object.contactIdInfo); + } + if (object.mobileIdInfo != null) { + if (typeof object.mobileIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.mobileIdInfo: object expected"); + message.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.fromObject(object.mobileIdInfo); + } + if (object.userIdInfo != null) { + if (typeof object.userIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.userIdInfo: object expected"); + message.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.fromObject(object.userIdInfo); + } + if (object.pairIdInfo != null) { + if (typeof object.pairIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pairIdInfo: object expected"); + message.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.fromObject(object.pairIdInfo); + } + if (object.pseudonymousIdInfo != null) { + if (typeof object.pseudonymousIdInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.pseudonymousIdInfo: object expected"); + message.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.fromObject(object.pseudonymousIdInfo); + } + if (object.partnerAudienceInfo != null) { + if (typeof object.partnerAudienceInfo !== "object") + throw TypeError(".google.ads.datamanager.v1.IngestedUserListInfo.partnerAudienceInfo: object expected"); + message.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.fromObject(object.partnerAudienceInfo); + } + return message; + }; + + /** + * Creates a plain object from an IngestedUserListInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {google.ads.datamanager.v1.IngestedUserListInfo} message IngestedUserListInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestedUserListInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uploadKeyTypes = []; + if (options.defaults) { + object.contactIdInfo = null; + object.mobileIdInfo = null; + object.userIdInfo = null; + object.pairIdInfo = null; + object.pseudonymousIdInfo = null; + object.partnerAudienceInfo = null; + } + if (message.uploadKeyTypes && message.uploadKeyTypes.length) { + object.uploadKeyTypes = []; + for (var j = 0; j < message.uploadKeyTypes.length; ++j) + object.uploadKeyTypes[j] = options.enums === String ? $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] === undefined ? message.uploadKeyTypes[j] : $root.google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType[message.uploadKeyTypes[j]] : message.uploadKeyTypes[j]; + } + if (message.contactIdInfo != null && message.hasOwnProperty("contactIdInfo")) + object.contactIdInfo = $root.google.ads.datamanager.v1.ContactIdInfo.toObject(message.contactIdInfo, options); + if (message.mobileIdInfo != null && message.hasOwnProperty("mobileIdInfo")) + object.mobileIdInfo = $root.google.ads.datamanager.v1.MobileIdInfo.toObject(message.mobileIdInfo, options); + if (message.userIdInfo != null && message.hasOwnProperty("userIdInfo")) + object.userIdInfo = $root.google.ads.datamanager.v1.UserIdInfo.toObject(message.userIdInfo, options); + if (message.pairIdInfo != null && message.hasOwnProperty("pairIdInfo")) + object.pairIdInfo = $root.google.ads.datamanager.v1.PairIdInfo.toObject(message.pairIdInfo, options); + if (message.pseudonymousIdInfo != null && message.hasOwnProperty("pseudonymousIdInfo")) + object.pseudonymousIdInfo = $root.google.ads.datamanager.v1.PseudonymousIdInfo.toObject(message.pseudonymousIdInfo, options); + if (message.partnerAudienceInfo != null && message.hasOwnProperty("partnerAudienceInfo")) + object.partnerAudienceInfo = $root.google.ads.datamanager.v1.PartnerAudienceInfo.toObject(message.partnerAudienceInfo, options); + return object; + }; + + /** + * Converts this IngestedUserListInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @instance + * @returns {Object.} JSON object + */ + IngestedUserListInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestedUserListInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.IngestedUserListInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestedUserListInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.IngestedUserListInfo"; + }; + + /** + * UploadKeyType enum. + * @name google.ads.datamanager.v1.IngestedUserListInfo.UploadKeyType + * @enum {number} + * @property {number} UPLOAD_KEY_TYPE_UNSPECIFIED=0 UPLOAD_KEY_TYPE_UNSPECIFIED value + * @property {number} CONTACT_ID=1 CONTACT_ID value + * @property {number} MOBILE_ID=2 MOBILE_ID value + * @property {number} USER_ID=3 USER_ID value + * @property {number} PAIR_ID=4 PAIR_ID value + * @property {number} PSEUDONYMOUS_ID=5 PSEUDONYMOUS_ID value + */ + IngestedUserListInfo.UploadKeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPLOAD_KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTACT_ID"] = 1; + values[valuesById[2] = "MOBILE_ID"] = 2; + values[valuesById[3] = "USER_ID"] = 3; + values[valuesById[4] = "PAIR_ID"] = 4; + values[valuesById[5] = "PSEUDONYMOUS_ID"] = 5; + return values; + })(); + + return IngestedUserListInfo; + })(); + + v1.ContactIdInfo = (function() { + + /** + * Properties of a ContactIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IContactIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] ContactIdInfo dataSourceType + * @property {number|null} [matchRatePercentage] ContactIdInfo matchRatePercentage + */ + + /** + * Constructs a new ContactIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ContactIdInfo. + * @implements IContactIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set + */ + function ContactIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContactIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + */ + ContactIdInfo.prototype.dataSourceType = null; + + /** + * ContactIdInfo matchRatePercentage. + * @member {number} matchRatePercentage + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + */ + ContactIdInfo.prototype.matchRatePercentage = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContactIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo instance + */ + ContactIdInfo.create = function create(properties) { + return new ContactIdInfo(properties); + }; + + /** + * Encodes the specified ContactIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchRatePercentage); + return writer; + }; + + /** + * Encodes the specified ContactIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ContactIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.IContactIdInfo} message ContactIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @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.ContactIdInfo} ContactIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactIdInfo.decode = function decode(reader, 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.ContactIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + case 2: { + message.matchRatePercentage = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + if (!$util.isInteger(message.matchRatePercentage)) + return "matchRatePercentage: integer expected"; + return null; + }; + + /** + * Creates a ContactIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ContactIdInfo} ContactIdInfo + */ + ContactIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ContactIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.ContactIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + if (object.matchRatePercentage != null) + message.matchRatePercentage = object.matchRatePercentage | 0; + return message; + }; + + /** + * Creates a plain object from a ContactIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {google.ads.datamanager.v1.ContactIdInfo} message ContactIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.matchRatePercentage = 0; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + object.matchRatePercentage = message.matchRatePercentage; + return object; + }; + + /** + * Converts this ContactIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @instance + * @returns {Object.} JSON object + */ + ContactIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContactIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ContactIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ContactIdInfo"; + }; + + return ContactIdInfo; + })(); + + v1.MobileIdInfo = (function() { + + /** + * Properties of a MobileIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IMobileIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] MobileIdInfo dataSourceType + * @property {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null} [keySpace] MobileIdInfo keySpace + * @property {string|null} [appId] MobileIdInfo appId + */ + + /** + * Constructs a new MobileIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a MobileIdInfo. + * @implements IMobileIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set + */ + function MobileIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MobileIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.dataSourceType = null; + + /** + * MobileIdInfo keySpace. + * @member {google.ads.datamanager.v1.MobileIdInfo.KeySpace|null|undefined} keySpace + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.keySpace = null; + + /** + * MobileIdInfo appId. + * @member {string|null|undefined} appId + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + */ + MobileIdInfo.prototype.appId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_keySpace", { + get: $util.oneOfGetter($oneOfFields = ["keySpace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MobileIdInfo.prototype, "_appId", { + get: $util.oneOfGetter($oneOfFields = ["appId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MobileIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo instance + */ + MobileIdInfo.create = function create(properties) { + return new MobileIdInfo(properties); + }; + + /** + * Encodes the specified MobileIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + if (message.keySpace != null && Object.hasOwnProperty.call(message, "keySpace")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keySpace); + if (message.appId != null && Object.hasOwnProperty.call(message, "appId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.appId); + return writer; + }; + + /** + * Encodes the specified MobileIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.MobileIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.IMobileIdInfo} message MobileIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MobileIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @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.MobileIdInfo} MobileIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileIdInfo.decode = function decode(reader, 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.MobileIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + case 2: { + message.keySpace = reader.int32(); + break; + } + case 3: { + message.appId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MobileIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MobileIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MobileIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MobileIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.keySpace != null && message.hasOwnProperty("keySpace")) { + properties._keySpace = 1; + switch (message.keySpace) { + default: + return "keySpace: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.appId != null && message.hasOwnProperty("appId")) { + properties._appId = 1; + if (!$util.isString(message.appId)) + return "appId: string expected"; + } + return null; + }; + + /** + * Creates a MobileIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.MobileIdInfo} MobileIdInfo + */ + MobileIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.MobileIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.MobileIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + switch (object.keySpace) { + default: + if (typeof object.keySpace === "number") { + message.keySpace = object.keySpace; + break; + } + break; + case "KEY_SPACE_UNSPECIFIED": + case 0: + message.keySpace = 0; + break; + case "IOS": + case 1: + message.keySpace = 1; + break; + case "ANDROID": + case 2: + message.keySpace = 2; + break; + } + if (object.appId != null) + message.appId = String(object.appId); + return message; + }; + + /** + * Creates a plain object from a MobileIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {google.ads.datamanager.v1.MobileIdInfo} message MobileIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MobileIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + if (message.keySpace != null && message.hasOwnProperty("keySpace")) { + object.keySpace = options.enums === String ? $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] === undefined ? message.keySpace : $root.google.ads.datamanager.v1.MobileIdInfo.KeySpace[message.keySpace] : message.keySpace; + if (options.oneofs) + object._keySpace = "keySpace"; + } + if (message.appId != null && message.hasOwnProperty("appId")) { + object.appId = message.appId; + if (options.oneofs) + object._appId = "appId"; + } + return object; + }; + + /** + * Converts this MobileIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @instance + * @returns {Object.} JSON object + */ + MobileIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MobileIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.MobileIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MobileIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.MobileIdInfo"; + }; + + /** + * KeySpace enum. + * @name google.ads.datamanager.v1.MobileIdInfo.KeySpace + * @enum {number} + * @property {number} KEY_SPACE_UNSPECIFIED=0 KEY_SPACE_UNSPECIFIED value + * @property {number} IOS=1 IOS value + * @property {number} ANDROID=2 ANDROID value + */ + MobileIdInfo.KeySpace = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_SPACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IOS"] = 1; + values[valuesById[2] = "ANDROID"] = 2; + return values; + })(); + + return MobileIdInfo; + })(); + + v1.UserIdInfo = (function() { + + /** + * Properties of a UserIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IUserIdInfo + * @property {google.ads.datamanager.v1.DataSourceType|null} [dataSourceType] UserIdInfo dataSourceType + */ + + /** + * Constructs a new UserIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserIdInfo. + * @implements IUserIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set + */ + function UserIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserIdInfo dataSourceType. + * @member {google.ads.datamanager.v1.DataSourceType|null|undefined} dataSourceType + * @memberof google.ads.datamanager.v1.UserIdInfo + * @instance + */ + UserIdInfo.prototype.dataSourceType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserIdInfo.prototype, "_dataSourceType", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo instance + */ + UserIdInfo.create = function create(properties) { + return new UserIdInfo(properties); + }; + + /** + * Encodes the specified UserIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataSourceType); + return writer; + }; + + /** + * Encodes the specified UserIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.IUserIdInfo} message UserIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserIdInfo + * @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.UserIdInfo} UserIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdInfo.decode = function decode(reader, 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.UserIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + properties._dataSourceType = 1; + switch (message.dataSourceType) { + default: + return "dataSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a UserIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserIdInfo} UserIdInfo + */ + UserIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.UserIdInfo(); + switch (object.dataSourceType) { + default: + if (typeof object.dataSourceType === "number") { + message.dataSourceType = object.dataSourceType; + break; + } + break; + case "DATA_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.dataSourceType = 0; + break; + case "DATA_SOURCE_TYPE_FIRST_PARTY": + case 1: + message.dataSourceType = 1; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": + case 2: + message.dataSourceType = 2; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": + case 3: + message.dataSourceType = 3; + break; + case "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": + case 4: + message.dataSourceType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a UserIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {google.ads.datamanager.v1.UserIdInfo} message UserIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + object.dataSourceType = options.enums === String ? $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] === undefined ? message.dataSourceType : $root.google.ads.datamanager.v1.DataSourceType[message.dataSourceType] : message.dataSourceType; + if (options.oneofs) + object._dataSourceType = "dataSourceType"; + } + return object; + }; + + /** + * Converts this UserIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserIdInfo + * @instance + * @returns {Object.} JSON object + */ + UserIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserIdInfo"; + }; + + return UserIdInfo; + })(); + + v1.PairIdInfo = (function() { + + /** + * Properties of a PairIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPairIdInfo + * @property {number|Long|null} [publisherId] PairIdInfo publisherId + * @property {string|null} [publisherName] PairIdInfo publisherName + * @property {number|null} [matchRatePercentage] PairIdInfo matchRatePercentage + * @property {number|Long|null} [advertiserIdentifierCount] PairIdInfo advertiserIdentifierCount + * @property {string|null} [cleanRoomIdentifier] PairIdInfo cleanRoomIdentifier + */ + + /** + * Constructs a new PairIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PairIdInfo. + * @implements IPairIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set + */ + function PairIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PairIdInfo publisherId. + * @member {number|Long|null|undefined} publisherId + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.publisherId = null; + + /** + * PairIdInfo publisherName. + * @member {string|null|undefined} publisherName + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.publisherName = null; + + /** + * PairIdInfo matchRatePercentage. + * @member {number} matchRatePercentage + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.matchRatePercentage = 0; + + /** + * PairIdInfo advertiserIdentifierCount. + * @member {number|Long} advertiserIdentifierCount + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.advertiserIdentifierCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PairIdInfo cleanRoomIdentifier. + * @member {string|null|undefined} cleanRoomIdentifier + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + */ + PairIdInfo.prototype.cleanRoomIdentifier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_publisherName", { + get: $util.oneOfGetter($oneOfFields = ["publisherName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairIdInfo.prototype, "_cleanRoomIdentifier", { + get: $util.oneOfGetter($oneOfFields = ["cleanRoomIdentifier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo instance + */ + PairIdInfo.create = function create(properties) { + return new PairIdInfo(properties); + }; + + /** + * Encodes the specified PairIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.publisherId); + if (message.publisherName != null && Object.hasOwnProperty.call(message, "publisherName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publisherName); + if (message.matchRatePercentage != null && Object.hasOwnProperty.call(message, "matchRatePercentage")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.matchRatePercentage); + if (message.advertiserIdentifierCount != null && Object.hasOwnProperty.call(message, "advertiserIdentifierCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.advertiserIdentifierCount); + if (message.cleanRoomIdentifier != null && Object.hasOwnProperty.call(message, "cleanRoomIdentifier")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.cleanRoomIdentifier); + return writer; + }; + + /** + * Encodes the specified PairIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PairIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.IPairIdInfo} message PairIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PairIdInfo + * @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.PairIdInfo} PairIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairIdInfo.decode = function decode(reader, 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.PairIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.int64(); + break; + } + case 2: { + message.publisherName = reader.string(); + break; + } + case 3: { + message.matchRatePercentage = reader.int32(); + break; + } + case 4: { + message.advertiserIdentifierCount = reader.int64(); + break; + } + case 5: { + message.cleanRoomIdentifier = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId) && !(message.publisherId && $util.isInteger(message.publisherId.low) && $util.isInteger(message.publisherId.high))) + return "publisherId: integer|Long expected"; + } + if (message.publisherName != null && message.hasOwnProperty("publisherName")) { + properties._publisherName = 1; + if (!$util.isString(message.publisherName)) + return "publisherName: string expected"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + if (!$util.isInteger(message.matchRatePercentage)) + return "matchRatePercentage: integer expected"; + if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) + if (!$util.isInteger(message.advertiserIdentifierCount) && !(message.advertiserIdentifierCount && $util.isInteger(message.advertiserIdentifierCount.low) && $util.isInteger(message.advertiserIdentifierCount.high))) + return "advertiserIdentifierCount: integer|Long expected"; + if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { + properties._cleanRoomIdentifier = 1; + if (!$util.isString(message.cleanRoomIdentifier)) + return "cleanRoomIdentifier: string expected"; + } + return null; + }; + + /** + * Creates a PairIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PairIdInfo} PairIdInfo + */ + PairIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PairIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PairIdInfo(); + if (object.publisherId != null) + if ($util.Long) + (message.publisherId = $util.Long.fromValue(object.publisherId)).unsigned = false; + else if (typeof object.publisherId === "string") + message.publisherId = parseInt(object.publisherId, 10); + else if (typeof object.publisherId === "number") + message.publisherId = object.publisherId; + else if (typeof object.publisherId === "object") + message.publisherId = new $util.LongBits(object.publisherId.low >>> 0, object.publisherId.high >>> 0).toNumber(); + if (object.publisherName != null) + message.publisherName = String(object.publisherName); + if (object.matchRatePercentage != null) + message.matchRatePercentage = object.matchRatePercentage | 0; + if (object.advertiserIdentifierCount != null) + if ($util.Long) + (message.advertiserIdentifierCount = $util.Long.fromValue(object.advertiserIdentifierCount)).unsigned = false; + else if (typeof object.advertiserIdentifierCount === "string") + message.advertiserIdentifierCount = parseInt(object.advertiserIdentifierCount, 10); + else if (typeof object.advertiserIdentifierCount === "number") + message.advertiserIdentifierCount = object.advertiserIdentifierCount; + else if (typeof object.advertiserIdentifierCount === "object") + message.advertiserIdentifierCount = new $util.LongBits(object.advertiserIdentifierCount.low >>> 0, object.advertiserIdentifierCount.high >>> 0).toNumber(); + if (object.cleanRoomIdentifier != null) + message.cleanRoomIdentifier = String(object.cleanRoomIdentifier); + return message; + }; + + /** + * Creates a plain object from a PairIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {google.ads.datamanager.v1.PairIdInfo} message PairIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchRatePercentage = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.advertiserIdentifierCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.advertiserIdentifierCount = options.longs === String ? "0" : 0; + } + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + if (typeof message.publisherId === "number") + object.publisherId = options.longs === String ? String(message.publisherId) : message.publisherId; + else + object.publisherId = options.longs === String ? $util.Long.prototype.toString.call(message.publisherId) : options.longs === Number ? new $util.LongBits(message.publisherId.low >>> 0, message.publisherId.high >>> 0).toNumber() : message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.publisherName != null && message.hasOwnProperty("publisherName")) { + object.publisherName = message.publisherName; + if (options.oneofs) + object._publisherName = "publisherName"; + } + if (message.matchRatePercentage != null && message.hasOwnProperty("matchRatePercentage")) + object.matchRatePercentage = message.matchRatePercentage; + if (message.advertiserIdentifierCount != null && message.hasOwnProperty("advertiserIdentifierCount")) + if (typeof message.advertiserIdentifierCount === "number") + object.advertiserIdentifierCount = options.longs === String ? String(message.advertiserIdentifierCount) : message.advertiserIdentifierCount; + else + object.advertiserIdentifierCount = options.longs === String ? $util.Long.prototype.toString.call(message.advertiserIdentifierCount) : options.longs === Number ? new $util.LongBits(message.advertiserIdentifierCount.low >>> 0, message.advertiserIdentifierCount.high >>> 0).toNumber() : message.advertiserIdentifierCount; + if (message.cleanRoomIdentifier != null && message.hasOwnProperty("cleanRoomIdentifier")) { + object.cleanRoomIdentifier = message.cleanRoomIdentifier; + if (options.oneofs) + object._cleanRoomIdentifier = "cleanRoomIdentifier"; + } + return object; + }; + + /** + * Converts this PairIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PairIdInfo + * @instance + * @returns {Object.} JSON object + */ + PairIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PairIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PairIdInfo"; + }; + + return PairIdInfo; + })(); + + v1.PartnerAudienceInfo = (function() { + + /** + * Properties of a PartnerAudienceInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPartnerAudienceInfo + * @property {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null} [partnerAudienceSource] PartnerAudienceInfo partnerAudienceSource + * @property {string|null} [commercePartner] PartnerAudienceInfo commercePartner + */ + + /** + * Constructs a new PartnerAudienceInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PartnerAudienceInfo. + * @implements IPartnerAudienceInfo + * @constructor + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set + */ + function PartnerAudienceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartnerAudienceInfo partnerAudienceSource. + * @member {google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource|null|undefined} partnerAudienceSource + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + */ + PartnerAudienceInfo.prototype.partnerAudienceSource = null; + + /** + * PartnerAudienceInfo commercePartner. + * @member {string|null|undefined} commercePartner + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + */ + PartnerAudienceInfo.prototype.commercePartner = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartnerAudienceInfo.prototype, "_partnerAudienceSource", { + get: $util.oneOfGetter($oneOfFields = ["partnerAudienceSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartnerAudienceInfo.prototype, "_commercePartner", { + get: $util.oneOfGetter($oneOfFields = ["commercePartner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PartnerAudienceInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo instance + */ + PartnerAudienceInfo.create = function create(properties) { + return new PartnerAudienceInfo(properties); + }; + + /** + * Encodes the specified PartnerAudienceInfo message. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerAudienceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partnerAudienceSource != null && Object.hasOwnProperty.call(message, "partnerAudienceSource")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partnerAudienceSource); + if (message.commercePartner != null && Object.hasOwnProperty.call(message, "commercePartner")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commercePartner); + return writer; + }; + + /** + * Encodes the specified PartnerAudienceInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PartnerAudienceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.IPartnerAudienceInfo} message PartnerAudienceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartnerAudienceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @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.PartnerAudienceInfo} PartnerAudienceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerAudienceInfo.decode = function decode(reader, 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.PartnerAudienceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partnerAudienceSource = reader.int32(); + break; + } + case 2: { + message.commercePartner = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartnerAudienceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartnerAudienceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartnerAudienceInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartnerAudienceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { + properties._partnerAudienceSource = 1; + switch (message.partnerAudienceSource) { + default: + return "partnerAudienceSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { + properties._commercePartner = 1; + if (!$util.isString(message.commercePartner)) + return "commercePartner: string expected"; + } + return null; + }; + + /** + * Creates a PartnerAudienceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PartnerAudienceInfo} PartnerAudienceInfo + */ + PartnerAudienceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PartnerAudienceInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PartnerAudienceInfo(); + switch (object.partnerAudienceSource) { + default: + if (typeof object.partnerAudienceSource === "number") { + message.partnerAudienceSource = object.partnerAudienceSource; + break; + } + break; + case "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": + case 0: + message.partnerAudienceSource = 0; + break; + case "COMMERCE_AUDIENCE": + case 1: + message.partnerAudienceSource = 1; + break; + case "LINEAR_TV_AUDIENCE": + case 2: + message.partnerAudienceSource = 2; + break; + case "AGENCY_PROVIDER_AUDIENCE": + case 3: + message.partnerAudienceSource = 3; + break; + } + if (object.commercePartner != null) + message.commercePartner = String(object.commercePartner); + return message; + }; + + /** + * Creates a plain object from a PartnerAudienceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {google.ads.datamanager.v1.PartnerAudienceInfo} message PartnerAudienceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartnerAudienceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.partnerAudienceSource != null && message.hasOwnProperty("partnerAudienceSource")) { + object.partnerAudienceSource = options.enums === String ? $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] === undefined ? message.partnerAudienceSource : $root.google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource[message.partnerAudienceSource] : message.partnerAudienceSource; + if (options.oneofs) + object._partnerAudienceSource = "partnerAudienceSource"; + } + if (message.commercePartner != null && message.hasOwnProperty("commercePartner")) { + object.commercePartner = message.commercePartner; + if (options.oneofs) + object._commercePartner = "commercePartner"; + } + return object; + }; + + /** + * Converts this PartnerAudienceInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @instance + * @returns {Object.} JSON object + */ + PartnerAudienceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartnerAudienceInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PartnerAudienceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartnerAudienceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PartnerAudienceInfo"; + }; + + /** + * PartnerAudienceSource enum. + * @name google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource + * @enum {number} + * @property {number} PARTNER_AUDIENCE_SOURCE_UNSPECIFIED=0 PARTNER_AUDIENCE_SOURCE_UNSPECIFIED value + * @property {number} COMMERCE_AUDIENCE=1 COMMERCE_AUDIENCE value + * @property {number} LINEAR_TV_AUDIENCE=2 LINEAR_TV_AUDIENCE value + * @property {number} AGENCY_PROVIDER_AUDIENCE=3 AGENCY_PROVIDER_AUDIENCE value + */ + PartnerAudienceInfo.PartnerAudienceSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMMERCE_AUDIENCE"] = 1; + values[valuesById[2] = "LINEAR_TV_AUDIENCE"] = 2; + values[valuesById[3] = "AGENCY_PROVIDER_AUDIENCE"] = 3; + return values; + })(); + + return PartnerAudienceInfo; + })(); + + v1.PseudonymousIdInfo = (function() { + + /** + * Properties of a PseudonymousIdInfo. + * @memberof google.ads.datamanager.v1 + * @interface IPseudonymousIdInfo + * @property {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null} [syncStatus] PseudonymousIdInfo syncStatus + * @property {number|Long|null} [billableRecordCount] PseudonymousIdInfo billableRecordCount + */ + + /** + * Constructs a new PseudonymousIdInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a PseudonymousIdInfo. + * @implements IPseudonymousIdInfo + * @constructor + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set + */ + function PseudonymousIdInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PseudonymousIdInfo syncStatus. + * @member {google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus|null|undefined} syncStatus + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + */ + PseudonymousIdInfo.prototype.syncStatus = null; + + /** + * PseudonymousIdInfo billableRecordCount. + * @member {number|Long|null|undefined} billableRecordCount + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + */ + PseudonymousIdInfo.prototype.billableRecordCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PseudonymousIdInfo.prototype, "_syncStatus", { + get: $util.oneOfGetter($oneOfFields = ["syncStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PseudonymousIdInfo.prototype, "_billableRecordCount", { + get: $util.oneOfGetter($oneOfFields = ["billableRecordCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PseudonymousIdInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo instance + */ + PseudonymousIdInfo.create = function create(properties) { + return new PseudonymousIdInfo(properties); + }; + + /** + * Encodes the specified PseudonymousIdInfo message. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PseudonymousIdInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.syncStatus != null && Object.hasOwnProperty.call(message, "syncStatus")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncStatus); + if (message.billableRecordCount != null && Object.hasOwnProperty.call(message, "billableRecordCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.billableRecordCount); + return writer; + }; + + /** + * Encodes the specified PseudonymousIdInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.PseudonymousIdInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.IPseudonymousIdInfo} message PseudonymousIdInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PseudonymousIdInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @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.PseudonymousIdInfo} PseudonymousIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PseudonymousIdInfo.decode = function decode(reader, 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.PseudonymousIdInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.syncStatus = reader.int32(); + break; + } + case 2: { + message.billableRecordCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PseudonymousIdInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PseudonymousIdInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PseudonymousIdInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PseudonymousIdInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { + properties._syncStatus = 1; + switch (message.syncStatus) { + default: + return "syncStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { + properties._billableRecordCount = 1; + if (!$util.isInteger(message.billableRecordCount) && !(message.billableRecordCount && $util.isInteger(message.billableRecordCount.low) && $util.isInteger(message.billableRecordCount.high))) + return "billableRecordCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a PseudonymousIdInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.PseudonymousIdInfo} PseudonymousIdInfo + */ + PseudonymousIdInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.PseudonymousIdInfo) + return object; + var message = new $root.google.ads.datamanager.v1.PseudonymousIdInfo(); + switch (object.syncStatus) { + default: + if (typeof object.syncStatus === "number") { + message.syncStatus = object.syncStatus; + break; + } + break; + case "SYNC_STATUS_UNSPECIFIED": + case 0: + message.syncStatus = 0; + break; + case "CREATED": + case 1: + message.syncStatus = 1; + break; + case "READY_FOR_USE": + case 2: + message.syncStatus = 2; + break; + case "FAILED": + case 3: + message.syncStatus = 3; + break; + } + if (object.billableRecordCount != null) + if ($util.Long) + (message.billableRecordCount = $util.Long.fromValue(object.billableRecordCount)).unsigned = false; + else if (typeof object.billableRecordCount === "string") + message.billableRecordCount = parseInt(object.billableRecordCount, 10); + else if (typeof object.billableRecordCount === "number") + message.billableRecordCount = object.billableRecordCount; + else if (typeof object.billableRecordCount === "object") + message.billableRecordCount = new $util.LongBits(object.billableRecordCount.low >>> 0, object.billableRecordCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PseudonymousIdInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {google.ads.datamanager.v1.PseudonymousIdInfo} message PseudonymousIdInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PseudonymousIdInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.syncStatus != null && message.hasOwnProperty("syncStatus")) { + object.syncStatus = options.enums === String ? $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] === undefined ? message.syncStatus : $root.google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus[message.syncStatus] : message.syncStatus; + if (options.oneofs) + object._syncStatus = "syncStatus"; + } + if (message.billableRecordCount != null && message.hasOwnProperty("billableRecordCount")) { + if (typeof message.billableRecordCount === "number") + object.billableRecordCount = options.longs === String ? String(message.billableRecordCount) : message.billableRecordCount; + else + object.billableRecordCount = options.longs === String ? $util.Long.prototype.toString.call(message.billableRecordCount) : options.longs === Number ? new $util.LongBits(message.billableRecordCount.low >>> 0, message.billableRecordCount.high >>> 0).toNumber() : message.billableRecordCount; + if (options.oneofs) + object._billableRecordCount = "billableRecordCount"; + } + return object; + }; + + /** + * Converts this PseudonymousIdInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @instance + * @returns {Object.} JSON object + */ + PseudonymousIdInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PseudonymousIdInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.PseudonymousIdInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PseudonymousIdInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.PseudonymousIdInfo"; + }; + + /** + * SyncStatus enum. + * @name google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus + * @enum {number} + * @property {number} SYNC_STATUS_UNSPECIFIED=0 SYNC_STATUS_UNSPECIFIED value + * @property {number} CREATED=1 CREATED value + * @property {number} READY_FOR_USE=2 READY_FOR_USE value + * @property {number} FAILED=3 FAILED value + */ + PseudonymousIdInfo.SyncStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYNC_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATED"] = 1; + values[valuesById[2] = "READY_FOR_USE"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return PseudonymousIdInfo; + })(); + + /** + * DataSourceType enum. + * @name google.ads.datamanager.v1.DataSourceType + * @enum {number} + * @property {number} DATA_SOURCE_TYPE_UNSPECIFIED=0 DATA_SOURCE_TYPE_UNSPECIFIED value + * @property {number} DATA_SOURCE_TYPE_FIRST_PARTY=1 DATA_SOURCE_TYPE_FIRST_PARTY value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU=2 DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE=3 DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE value + * @property {number} DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA=4 DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA value + */ + v1.DataSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_SOURCE_TYPE_FIRST_PARTY"] = 1; + values[valuesById[2] = "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU"] = 2; + values[valuesById[3] = "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE"] = 3; + values[valuesById[4] = "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"] = 4; + return values; + })(); + + v1.UserListDirectLicense = (function() { + + /** + * Properties of a UserListDirectLicense. + * @memberof google.ads.datamanager.v1 + * @interface IUserListDirectLicense + * @property {string|null} [name] UserListDirectLicense name + * @property {number|Long|null} [userListId] UserListDirectLicense userListId + * @property {string|null} [userListDisplayName] UserListDirectLicense userListDisplayName + * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListDirectLicense clientAccountType + * @property {number|Long|null} [clientAccountId] UserListDirectLicense clientAccountId + * @property {string|null} [clientAccountDisplayName] UserListDirectLicense clientAccountDisplayName + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListDirectLicense status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListDirectLicense pricing + * @property {Array.|null} [historicalPricings] UserListDirectLicense historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListDirectLicense metrics + */ + + /** + * Constructs a new UserListDirectLicense. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListDirectLicense. + * @implements IUserListDirectLicense + * @constructor + * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set + */ + function UserListDirectLicense(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListDirectLicense name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.name = ""; + + /** + * UserListDirectLicense userListId. + * @member {number|Long|null|undefined} userListId + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.userListId = null; + + /** + * UserListDirectLicense userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.userListDisplayName = ""; + + /** + * UserListDirectLicense clientAccountType. + * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType|null|undefined} clientAccountType + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountType = null; + + /** + * UserListDirectLicense clientAccountId. + * @member {number|Long|null|undefined} clientAccountId + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountId = null; + + /** + * UserListDirectLicense clientAccountDisplayName. + * @member {string} clientAccountDisplayName + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.clientAccountDisplayName = ""; + + /** + * UserListDirectLicense status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.status = null; + + /** + * UserListDirectLicense pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.pricing = null; + + /** + * UserListDirectLicense historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListDirectLicense metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + */ + UserListDirectLicense.prototype.metrics = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_userListId", { + get: $util.oneOfGetter($oneOfFields = ["userListId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountType", { + get: $util.oneOfGetter($oneOfFields = ["clientAccountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_clientAccountId", { + get: $util.oneOfGetter($oneOfFields = ["clientAccountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListDirectLicense.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListDirectLicense instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense instance + */ + UserListDirectLicense.create = function create(properties) { + return new UserListDirectLicense(properties); + }; + + /** + * Encodes the specified UserListDirectLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListDirectLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clientAccountType); + if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientAccountId); + if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.clientAccountDisplayName); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListDirectLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListDirectLicense.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.IUserListDirectLicense} message UserListDirectLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListDirectLicense.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @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.UserListDirectLicense} UserListDirectLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListDirectLicense.decode = function decode(reader, 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.UserListDirectLicense(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.clientAccountType = reader.int32(); + break; + } + case 5: { + message.clientAccountId = reader.int64(); + break; + } + case 6: { + message.clientAccountDisplayName = reader.string(); + break; + } + case 7: { + message.status = reader.int32(); + break; + } + case 8: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 10: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListDirectLicense message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListDirectLicense.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListDirectLicense message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListDirectLicense.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.userListId != null && message.hasOwnProperty("userListId")) { + properties._userListId = 1; + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { + properties._clientAccountType = 1; + switch (message.clientAccountType) { + default: + return "clientAccountType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { + properties._clientAccountId = 1; + if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) + return "clientAccountId: integer|Long expected"; + } + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + if (!$util.isString(message.clientAccountDisplayName)) + return "clientAccountDisplayName: 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListDirectLicense message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListDirectLicense} UserListDirectLicense + */ + UserListDirectLicense.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListDirectLicense) + return object; + var message = new $root.google.ads.datamanager.v1.UserListDirectLicense(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.clientAccountType) { + default: + if (typeof object.clientAccountType === "number") { + message.clientAccountType = object.clientAccountType; + break; + } + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": + case 0: + message.clientAccountType = 0; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": + case 1: + message.clientAccountType = 1; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": + case 2: + message.clientAccountType = 2; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": + case 3: + message.clientAccountType = 3; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 4: + message.clientAccountType = 4; + break; + } + if (object.clientAccountId != null) + if ($util.Long) + (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; + else if (typeof object.clientAccountId === "string") + message.clientAccountId = parseInt(object.clientAccountId, 10); + else if (typeof object.clientAccountId === "number") + message.clientAccountId = object.clientAccountId; + else if (typeof object.clientAccountId === "object") + message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); + if (object.clientAccountDisplayName != null) + message.clientAccountDisplayName = String(object.clientAccountDisplayName); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListDirectLicense.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListDirectLicense message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {google.ads.datamanager.v1.UserListDirectLicense} message UserListDirectLicense + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListDirectLicense.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + object.userListDisplayName = ""; + object.clientAccountDisplayName = ""; + object.pricing = null; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) { + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (options.oneofs) + object._userListId = "userListId"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) { + object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; + if (options.oneofs) + object._clientAccountType = "clientAccountType"; + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) { + if (typeof message.clientAccountId === "number") + object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; + else + object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; + if (options.oneofs) + object._clientAccountId = "clientAccountId"; + } + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + object.clientAccountDisplayName = message.clientAccountDisplayName; + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListDirectLicense to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @instance + * @returns {Object.} JSON object + */ + UserListDirectLicense.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListDirectLicense + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListDirectLicense + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListDirectLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListDirectLicense"; + }; + + return UserListDirectLicense; + })(); + + /** + * UserListLicenseClientAccountType enum. + * @name google.ads.datamanager.v1.UserListLicenseClientAccountType + * @enum {number} + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN=0 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS=1 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER=2 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER=3 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER value + * @property {number} USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK=4 USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK value + */ + v1.UserListLicenseClientAccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS"] = 1; + values[valuesById[2] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER"] = 2; + values[valuesById[3] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER"] = 3; + values[valuesById[4] = "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK"] = 4; + return values; + })(); + + v1.UserListLicenseMetrics = (function() { + + /** + * Properties of a UserListLicenseMetrics. + * @memberof google.ads.datamanager.v1 + * @interface IUserListLicenseMetrics + * @property {number|Long|null} [clickCount] UserListLicenseMetrics clickCount + * @property {number|Long|null} [impressionCount] UserListLicenseMetrics impressionCount + * @property {number|Long|null} [revenueUsdMicros] UserListLicenseMetrics revenueUsdMicros + * @property {number|Long|null} [startDate] UserListLicenseMetrics startDate + * @property {number|Long|null} [endDate] UserListLicenseMetrics endDate + */ + + /** + * Constructs a new UserListLicenseMetrics. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListLicenseMetrics. + * @implements IUserListLicenseMetrics + * @constructor + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set + */ + function UserListLicenseMetrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListLicenseMetrics clickCount. + * @member {number|Long} clickCount + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.clickCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics impressionCount. + * @member {number|Long} impressionCount + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.impressionCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics revenueUsdMicros. + * @member {number|Long} revenueUsdMicros + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.revenueUsdMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics startDate. + * @member {number|Long} startDate + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.startDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicenseMetrics endDate. + * @member {number|Long} endDate + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + */ + UserListLicenseMetrics.prototype.endDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UserListLicenseMetrics instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics instance + */ + UserListLicenseMetrics.create = function create(properties) { + return new UserListLicenseMetrics(properties); + }; + + /** + * Encodes the specified UserListLicenseMetrics message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicenseMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clickCount != null && Object.hasOwnProperty.call(message, "clickCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.clickCount); + if (message.impressionCount != null && Object.hasOwnProperty.call(message, "impressionCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.impressionCount); + if (message.revenueUsdMicros != null && Object.hasOwnProperty.call(message, "revenueUsdMicros")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.revenueUsdMicros); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endDate); + return writer; + }; + + /** + * Encodes the specified UserListLicenseMetrics message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicenseMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.IUserListLicenseMetrics} message UserListLicenseMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicenseMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @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.UserListLicenseMetrics} UserListLicenseMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicenseMetrics.decode = function decode(reader, 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.UserListLicenseMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clickCount = reader.int64(); + break; + } + case 2: { + message.impressionCount = reader.int64(); + break; + } + case 3: { + message.revenueUsdMicros = reader.int64(); + break; + } + case 4: { + message.startDate = reader.int64(); + break; + } + case 5: { + message.endDate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListLicenseMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicenseMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListLicenseMetrics message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListLicenseMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clickCount != null && message.hasOwnProperty("clickCount")) + if (!$util.isInteger(message.clickCount) && !(message.clickCount && $util.isInteger(message.clickCount.low) && $util.isInteger(message.clickCount.high))) + return "clickCount: integer|Long expected"; + if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) + if (!$util.isInteger(message.impressionCount) && !(message.impressionCount && $util.isInteger(message.impressionCount.low) && $util.isInteger(message.impressionCount.high))) + return "impressionCount: integer|Long expected"; + if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) + if (!$util.isInteger(message.revenueUsdMicros) && !(message.revenueUsdMicros && $util.isInteger(message.revenueUsdMicros.low) && $util.isInteger(message.revenueUsdMicros.high))) + return "revenueUsdMicros: integer|Long expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isInteger(message.startDate) && !(message.startDate && $util.isInteger(message.startDate.low) && $util.isInteger(message.startDate.high))) + return "startDate: integer|Long expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isInteger(message.endDate) && !(message.endDate && $util.isInteger(message.endDate.low) && $util.isInteger(message.endDate.high))) + return "endDate: integer|Long expected"; + return null; + }; + + /** + * Creates a UserListLicenseMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListLicenseMetrics} UserListLicenseMetrics + */ + UserListLicenseMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListLicenseMetrics) + return object; + var message = new $root.google.ads.datamanager.v1.UserListLicenseMetrics(); + if (object.clickCount != null) + if ($util.Long) + (message.clickCount = $util.Long.fromValue(object.clickCount)).unsigned = false; + else if (typeof object.clickCount === "string") + message.clickCount = parseInt(object.clickCount, 10); + else if (typeof object.clickCount === "number") + message.clickCount = object.clickCount; + else if (typeof object.clickCount === "object") + message.clickCount = new $util.LongBits(object.clickCount.low >>> 0, object.clickCount.high >>> 0).toNumber(); + if (object.impressionCount != null) + if ($util.Long) + (message.impressionCount = $util.Long.fromValue(object.impressionCount)).unsigned = false; + else if (typeof object.impressionCount === "string") + message.impressionCount = parseInt(object.impressionCount, 10); + else if (typeof object.impressionCount === "number") + message.impressionCount = object.impressionCount; + else if (typeof object.impressionCount === "object") + message.impressionCount = new $util.LongBits(object.impressionCount.low >>> 0, object.impressionCount.high >>> 0).toNumber(); + if (object.revenueUsdMicros != null) + if ($util.Long) + (message.revenueUsdMicros = $util.Long.fromValue(object.revenueUsdMicros)).unsigned = false; + else if (typeof object.revenueUsdMicros === "string") + message.revenueUsdMicros = parseInt(object.revenueUsdMicros, 10); + else if (typeof object.revenueUsdMicros === "number") + message.revenueUsdMicros = object.revenueUsdMicros; + else if (typeof object.revenueUsdMicros === "object") + message.revenueUsdMicros = new $util.LongBits(object.revenueUsdMicros.low >>> 0, object.revenueUsdMicros.high >>> 0).toNumber(); + if (object.startDate != null) + if ($util.Long) + (message.startDate = $util.Long.fromValue(object.startDate)).unsigned = false; + else if (typeof object.startDate === "string") + message.startDate = parseInt(object.startDate, 10); + else if (typeof object.startDate === "number") + message.startDate = object.startDate; + else if (typeof object.startDate === "object") + message.startDate = new $util.LongBits(object.startDate.low >>> 0, object.startDate.high >>> 0).toNumber(); + if (object.endDate != null) + if ($util.Long) + (message.endDate = $util.Long.fromValue(object.endDate)).unsigned = false; + else if (typeof object.endDate === "string") + message.endDate = parseInt(object.endDate, 10); + else if (typeof object.endDate === "number") + message.endDate = object.endDate; + else if (typeof object.endDate === "object") + message.endDate = new $util.LongBits(object.endDate.low >>> 0, object.endDate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a UserListLicenseMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {google.ads.datamanager.v1.UserListLicenseMetrics} message UserListLicenseMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListLicenseMetrics.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.clickCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.clickCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.impressionCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.impressionCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.revenueUsdMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revenueUsdMicros = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startDate = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endDate = options.longs === String ? "0" : 0; + } + if (message.clickCount != null && message.hasOwnProperty("clickCount")) + if (typeof message.clickCount === "number") + object.clickCount = options.longs === String ? String(message.clickCount) : message.clickCount; + else + object.clickCount = options.longs === String ? $util.Long.prototype.toString.call(message.clickCount) : options.longs === Number ? new $util.LongBits(message.clickCount.low >>> 0, message.clickCount.high >>> 0).toNumber() : message.clickCount; + if (message.impressionCount != null && message.hasOwnProperty("impressionCount")) + if (typeof message.impressionCount === "number") + object.impressionCount = options.longs === String ? String(message.impressionCount) : message.impressionCount; + else + object.impressionCount = options.longs === String ? $util.Long.prototype.toString.call(message.impressionCount) : options.longs === Number ? new $util.LongBits(message.impressionCount.low >>> 0, message.impressionCount.high >>> 0).toNumber() : message.impressionCount; + if (message.revenueUsdMicros != null && message.hasOwnProperty("revenueUsdMicros")) + if (typeof message.revenueUsdMicros === "number") + object.revenueUsdMicros = options.longs === String ? String(message.revenueUsdMicros) : message.revenueUsdMicros; + else + object.revenueUsdMicros = options.longs === String ? $util.Long.prototype.toString.call(message.revenueUsdMicros) : options.longs === Number ? new $util.LongBits(message.revenueUsdMicros.low >>> 0, message.revenueUsdMicros.high >>> 0).toNumber() : message.revenueUsdMicros; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (typeof message.startDate === "number") + object.startDate = options.longs === String ? String(message.startDate) : message.startDate; + else + object.startDate = options.longs === String ? $util.Long.prototype.toString.call(message.startDate) : options.longs === Number ? new $util.LongBits(message.startDate.low >>> 0, message.startDate.high >>> 0).toNumber() : message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (typeof message.endDate === "number") + object.endDate = options.longs === String ? String(message.endDate) : message.endDate; + else + object.endDate = options.longs === String ? $util.Long.prototype.toString.call(message.endDate) : options.longs === Number ? new $util.LongBits(message.endDate.low >>> 0, message.endDate.high >>> 0).toNumber() : message.endDate; + return object; + }; + + /** + * Converts this UserListLicenseMetrics to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @instance + * @returns {Object.} JSON object + */ + UserListLicenseMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListLicenseMetrics + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListLicenseMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListLicenseMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicenseMetrics"; + }; + + return UserListLicenseMetrics; + })(); + + v1.UserListLicensePricing = (function() { + + /** + * Properties of a UserListLicensePricing. + * @memberof google.ads.datamanager.v1 + * @interface IUserListLicensePricing + * @property {number|Long|null} [pricingId] UserListLicensePricing pricingId + * @property {number|Long|null} [costMicros] UserListLicensePricing costMicros + * @property {string|null} [currencyCode] UserListLicensePricing currencyCode + * @property {google.protobuf.ITimestamp|null} [startTime] UserListLicensePricing startTime + * @property {google.protobuf.ITimestamp|null} [endTime] UserListLicensePricing endTime + * @property {boolean|null} [pricingActive] UserListLicensePricing pricingActive + * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState|null} [buyerApprovalState] UserListLicensePricing buyerApprovalState + * @property {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null} [costType] UserListLicensePricing costType + * @property {number|Long|null} [maxCostMicros] UserListLicensePricing maxCostMicros + */ + + /** + * Constructs a new UserListLicensePricing. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListLicensePricing. + * @implements IUserListLicensePricing + * @constructor + * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set + */ + function UserListLicensePricing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListLicensePricing pricingId. + * @member {number|Long} pricingId + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.pricingId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListLicensePricing costMicros. + * @member {number|Long|null|undefined} costMicros + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.costMicros = null; + + /** + * UserListLicensePricing currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.currencyCode = null; + + /** + * UserListLicensePricing startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.startTime = null; + + /** + * UserListLicensePricing endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.endTime = null; + + /** + * UserListLicensePricing pricingActive. + * @member {boolean} pricingActive + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.pricingActive = false; + + /** + * UserListLicensePricing buyerApprovalState. + * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState} buyerApprovalState + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.buyerApprovalState = 0; + + /** + * UserListLicensePricing costType. + * @member {google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType|null|undefined} costType + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.costType = null; + + /** + * UserListLicensePricing maxCostMicros. + * @member {number|Long|null|undefined} maxCostMicros + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + */ + UserListLicensePricing.prototype.maxCostMicros = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_costMicros", { + get: $util.oneOfGetter($oneOfFields = ["costMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_costType", { + get: $util.oneOfGetter($oneOfFields = ["costType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListLicensePricing.prototype, "_maxCostMicros", { + get: $util.oneOfGetter($oneOfFields = ["maxCostMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListLicensePricing instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing instance + */ + UserListLicensePricing.create = function create(properties) { + return new UserListLicensePricing(properties); + }; + + /** + * Encodes the specified UserListLicensePricing message. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicensePricing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pricingId != null && Object.hasOwnProperty.call(message, "pricingId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pricingId); + if (message.costMicros != null && Object.hasOwnProperty.call(message, "costMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.costMicros); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pricingActive != null && Object.hasOwnProperty.call(message, "pricingActive")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.pricingActive); + if (message.buyerApprovalState != null && Object.hasOwnProperty.call(message, "buyerApprovalState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.buyerApprovalState); + if (message.costType != null && Object.hasOwnProperty.call(message, "costType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.costType); + if (message.maxCostMicros != null && Object.hasOwnProperty.call(message, "maxCostMicros")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxCostMicros); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.currencyCode); + return writer; + }; + + /** + * Encodes the specified UserListLicensePricing message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListLicensePricing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.IUserListLicensePricing} message UserListLicensePricing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListLicensePricing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @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.UserListLicensePricing} UserListLicensePricing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicensePricing.decode = function decode(reader, 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.UserListLicensePricing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pricingId = reader.int64(); + break; + } + case 2: { + message.costMicros = reader.int64(); + break; + } + case 9: { + message.currencyCode = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pricingActive = reader.bool(); + break; + } + case 6: { + message.buyerApprovalState = reader.int32(); + break; + } + case 7: { + message.costType = reader.int32(); + break; + } + case 8: { + message.maxCostMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListLicensePricing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListLicensePricing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListLicensePricing message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListLicensePricing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pricingId != null && message.hasOwnProperty("pricingId")) + if (!$util.isInteger(message.pricingId) && !(message.pricingId && $util.isInteger(message.pricingId.low) && $util.isInteger(message.pricingId.high))) + return "pricingId: integer|Long expected"; + if (message.costMicros != null && message.hasOwnProperty("costMicros")) { + properties._costMicros = 1; + if (!$util.isInteger(message.costMicros) && !(message.costMicros && $util.isInteger(message.costMicros.low) && $util.isInteger(message.costMicros.high))) + return "costMicros: integer|Long 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")) { + 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; + } + if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) + if (typeof message.pricingActive !== "boolean") + return "pricingActive: boolean expected"; + if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) + switch (message.buyerApprovalState) { + default: + return "buyerApprovalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.costType != null && message.hasOwnProperty("costType")) { + properties._costType = 1; + switch (message.costType) { + default: + return "costType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { + properties._maxCostMicros = 1; + if (!$util.isInteger(message.maxCostMicros) && !(message.maxCostMicros && $util.isInteger(message.maxCostMicros.low) && $util.isInteger(message.maxCostMicros.high))) + return "maxCostMicros: integer|Long expected"; + } + return null; + }; + + /** + * Creates a UserListLicensePricing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListLicensePricing} UserListLicensePricing + */ + UserListLicensePricing.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListLicensePricing) + return object; + var message = new $root.google.ads.datamanager.v1.UserListLicensePricing(); + if (object.pricingId != null) + if ($util.Long) + (message.pricingId = $util.Long.fromValue(object.pricingId)).unsigned = false; + else if (typeof object.pricingId === "string") + message.pricingId = parseInt(object.pricingId, 10); + else if (typeof object.pricingId === "number") + message.pricingId = object.pricingId; + else if (typeof object.pricingId === "object") + message.pricingId = new $util.LongBits(object.pricingId.low >>> 0, object.pricingId.high >>> 0).toNumber(); + if (object.costMicros != null) + if ($util.Long) + (message.costMicros = $util.Long.fromValue(object.costMicros)).unsigned = false; + else if (typeof object.costMicros === "string") + message.costMicros = parseInt(object.costMicros, 10); + else if (typeof object.costMicros === "number") + message.costMicros = object.costMicros; + else if (typeof object.costMicros === "object") + message.costMicros = new $util.LongBits(object.costMicros.low >>> 0, object.costMicros.high >>> 0).toNumber(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListLicensePricing.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.datamanager.v1.UserListLicensePricing.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.pricingActive != null) + message.pricingActive = Boolean(object.pricingActive); + switch (object.buyerApprovalState) { + default: + if (typeof object.buyerApprovalState === "number") { + message.buyerApprovalState = object.buyerApprovalState; + break; + } + break; + case "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": + case 0: + message.buyerApprovalState = 0; + break; + case "PENDING": + case 1: + message.buyerApprovalState = 1; + break; + case "APPROVED": + case 2: + message.buyerApprovalState = 2; + break; + case "REJECTED": + case 3: + message.buyerApprovalState = 3; + break; + } + switch (object.costType) { + default: + if (typeof object.costType === "number") { + message.costType = object.costType; + break; + } + break; + case "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": + case 0: + message.costType = 0; + break; + case "CPC": + case 1: + message.costType = 1; + break; + case "CPM": + case 2: + message.costType = 2; + break; + case "MEDIA_SHARE": + case 3: + message.costType = 3; + break; + } + if (object.maxCostMicros != null) + if ($util.Long) + (message.maxCostMicros = $util.Long.fromValue(object.maxCostMicros)).unsigned = false; + else if (typeof object.maxCostMicros === "string") + message.maxCostMicros = parseInt(object.maxCostMicros, 10); + else if (typeof object.maxCostMicros === "number") + message.maxCostMicros = object.maxCostMicros; + else if (typeof object.maxCostMicros === "object") + message.maxCostMicros = new $util.LongBits(object.maxCostMicros.low >>> 0, object.maxCostMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a UserListLicensePricing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {google.ads.datamanager.v1.UserListLicensePricing} message UserListLicensePricing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListLicensePricing.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.pricingId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pricingId = options.longs === String ? "0" : 0; + object.startTime = null; + object.endTime = null; + object.pricingActive = false; + object.buyerApprovalState = options.enums === String ? "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED" : 0; + } + if (message.pricingId != null && message.hasOwnProperty("pricingId")) + if (typeof message.pricingId === "number") + object.pricingId = options.longs === String ? String(message.pricingId) : message.pricingId; + else + object.pricingId = options.longs === String ? $util.Long.prototype.toString.call(message.pricingId) : options.longs === Number ? new $util.LongBits(message.pricingId.low >>> 0, message.pricingId.high >>> 0).toNumber() : message.pricingId; + if (message.costMicros != null && message.hasOwnProperty("costMicros")) { + if (typeof message.costMicros === "number") + object.costMicros = options.longs === String ? String(message.costMicros) : message.costMicros; + else + object.costMicros = options.longs === String ? $util.Long.prototype.toString.call(message.costMicros) : options.longs === Number ? new $util.LongBits(message.costMicros.low >>> 0, message.costMicros.high >>> 0).toNumber() : message.costMicros; + if (options.oneofs) + object._costMicros = "costMicros"; + } + 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); + if (message.pricingActive != null && message.hasOwnProperty("pricingActive")) + object.pricingActive = message.pricingActive; + if (message.buyerApprovalState != null && message.hasOwnProperty("buyerApprovalState")) + object.buyerApprovalState = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] === undefined ? message.buyerApprovalState : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState[message.buyerApprovalState] : message.buyerApprovalState; + if (message.costType != null && message.hasOwnProperty("costType")) { + object.costType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] === undefined ? message.costType : $root.google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType[message.costType] : message.costType; + if (options.oneofs) + object._costType = "costType"; + } + if (message.maxCostMicros != null && message.hasOwnProperty("maxCostMicros")) { + if (typeof message.maxCostMicros === "number") + object.maxCostMicros = options.longs === String ? String(message.maxCostMicros) : message.maxCostMicros; + else + object.maxCostMicros = options.longs === String ? $util.Long.prototype.toString.call(message.maxCostMicros) : options.longs === Number ? new $util.LongBits(message.maxCostMicros.low >>> 0, message.maxCostMicros.high >>> 0).toNumber() : message.maxCostMicros; + if (options.oneofs) + object._maxCostMicros = "maxCostMicros"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + return object; + }; + + /** + * Converts this UserListLicensePricing to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @instance + * @returns {Object.} JSON object + */ + UserListLicensePricing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListLicensePricing + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListLicensePricing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListLicensePricing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListLicensePricing"; + }; + + /** + * UserListPricingBuyerApprovalState enum. + * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingBuyerApprovalState + * @enum {number} + * @property {number} USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED=0 USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} APPROVED=2 APPROVED value + * @property {number} REJECTED=3 REJECTED value + */ + UserListLicensePricing.UserListPricingBuyerApprovalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "APPROVED"] = 2; + values[valuesById[3] = "REJECTED"] = 3; + return values; + })(); + + /** + * UserListPricingCostType enum. + * @name google.ads.datamanager.v1.UserListLicensePricing.UserListPricingCostType + * @enum {number} + * @property {number} USER_LIST_PRICING_COST_TYPE_UNSPECIFIED=0 USER_LIST_PRICING_COST_TYPE_UNSPECIFIED value + * @property {number} CPC=1 CPC value + * @property {number} CPM=2 CPM value + * @property {number} MEDIA_SHARE=3 MEDIA_SHARE value + */ + UserListLicensePricing.UserListPricingCostType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CPC"] = 1; + values[valuesById[2] = "CPM"] = 2; + values[valuesById[3] = "MEDIA_SHARE"] = 3; + return values; + })(); + + return UserListLicensePricing; + })(); + + /** + * UserListLicenseStatus enum. + * @name google.ads.datamanager.v1.UserListLicenseStatus + * @enum {number} + * @property {number} USER_LIST_LICENSE_STATUS_UNSPECIFIED=0 USER_LIST_LICENSE_STATUS_UNSPECIFIED value + * @property {number} USER_LIST_LICENSE_STATUS_ENABLED=1 USER_LIST_LICENSE_STATUS_ENABLED value + * @property {number} USER_LIST_LICENSE_STATUS_DISABLED=2 USER_LIST_LICENSE_STATUS_DISABLED value + */ + v1.UserListLicenseStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_LICENSE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_LIST_LICENSE_STATUS_ENABLED"] = 1; + values[valuesById[2] = "USER_LIST_LICENSE_STATUS_DISABLED"] = 2; + return values; + })(); + + v1.UserListDirectLicenseService = (function() { + + /** + * Constructs a new UserListDirectLicenseService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListDirectLicenseService + * @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 UserListDirectLicenseService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListDirectLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListDirectLicenseService; + + /** + * Creates new UserListDirectLicenseService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @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 {UserListDirectLicenseService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListDirectLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|createUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef CreateUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls CreateUserListDirectLicense. + * @function createUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.createUserListDirectLicense = function createUserListDirectLicense(request, callback) { + return this.rpcCall(createUserListDirectLicense, $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "CreateUserListDirectLicense" }); + + /** + * Calls CreateUserListDirectLicense. + * @function createUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} request CreateUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|getUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef GetUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls GetUserListDirectLicense. + * @function getUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.getUserListDirectLicense = function getUserListDirectLicense(request, callback) { + return this.rpcCall(getUserListDirectLicense, $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "GetUserListDirectLicense" }); + + /** + * Calls GetUserListDirectLicense. + * @function getUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} request GetUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|updateUserListDirectLicense}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef UpdateUserListDirectLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListDirectLicense} [response] UserListDirectLicense + */ + + /** + * Calls UpdateUserListDirectLicense. + * @function updateUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicenseCallback} callback Node-style callback called with the error, if any, and UserListDirectLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.updateUserListDirectLicense = function updateUserListDirectLicense(request, callback) { + return this.rpcCall(updateUserListDirectLicense, $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest, $root.google.ads.datamanager.v1.UserListDirectLicense, request, callback); + }, "name", { value: "UpdateUserListDirectLicense" }); + + /** + * Calls UpdateUserListDirectLicense. + * @function updateUserListDirectLicense + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} request UpdateUserListDirectLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListDirectLicenseService|listUserListDirectLicenses}. + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @typedef ListUserListDirectLicensesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} [response] ListUserListDirectLicensesResponse + */ + + /** + * Calls ListUserListDirectLicenses. + * @function listUserListDirectLicenses + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object + * @param {google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListDirectLicensesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListDirectLicenseService.prototype.listUserListDirectLicenses = function listUserListDirectLicenses(request, callback) { + return this.rpcCall(listUserListDirectLicenses, $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest, $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse, request, callback); + }, "name", { value: "ListUserListDirectLicenses" }); + + /** + * Calls ListUserListDirectLicenses. + * @function listUserListDirectLicenses + * @memberof google.ads.datamanager.v1.UserListDirectLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} request ListUserListDirectLicensesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListDirectLicenseService; + })(); + + v1.CreateUserListDirectLicenseRequest = (function() { + + /** + * Properties of a CreateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreateUserListDirectLicenseRequest + * @property {string|null} [parent] CreateUserListDirectLicenseRequest parent + * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] CreateUserListDirectLicenseRequest userListDirectLicense + */ + + /** + * Constructs a new CreateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreateUserListDirectLicenseRequest. + * @implements ICreateUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set + */ + function CreateUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserListDirectLicenseRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + */ + CreateUserListDirectLicenseRequest.prototype.parent = ""; + + /** + * CreateUserListDirectLicenseRequest userListDirectLicense. + * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + */ + CreateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; + + /** + * Creates a new CreateUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest instance + */ + CreateUserListDirectLicenseRequest.create = function create(properties) { + return new CreateUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @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.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListDirectLicenseRequest.decode = function decode(reader, 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.CreateUserListDirectLicenseRequest(); + 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.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserListDirectLicenseRequest.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.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); + if (error) + return "userListDirectLicense." + error; + } + return null; + }; + + /** + * Creates a CreateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} CreateUserListDirectLicenseRequest + */ + CreateUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreateUserListDirectLicenseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userListDirectLicense != null) { + if (typeof object.userListDirectLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListDirectLicenseRequest.userListDirectLicense: object expected"); + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.CreateUserListDirectLicenseRequest} message CreateUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserListDirectLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userListDirectLicense = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) + object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); + return object; + }; + + /** + * Converts this CreateUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreateUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListDirectLicenseRequest"; + }; + + return CreateUserListDirectLicenseRequest; + })(); + + v1.GetUserListDirectLicenseRequest = (function() { + + /** + * Properties of a GetUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListDirectLicenseRequest + * @property {string|null} [name] GetUserListDirectLicenseRequest name + */ + + /** + * Constructs a new GetUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListDirectLicenseRequest. + * @implements IGetUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set + */ + function GetUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListDirectLicenseRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @instance + */ + GetUserListDirectLicenseRequest.prototype.name = ""; + + /** + * Creates a new GetUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest instance + */ + GetUserListDirectLicenseRequest.create = function create(properties) { + return new GetUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified GetUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @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.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListDirectLicenseRequest.decode = function decode(reader, 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.GetUserListDirectLicenseRequest(); + 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 GetUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} GetUserListDirectLicenseRequest + */ + GetUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListDirectLicenseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListDirectLicenseRequest} message GetUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListDirectLicenseRequest.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 GetUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListDirectLicenseRequest"; + }; + + return GetUserListDirectLicenseRequest; + })(); + + v1.UpdateUserListDirectLicenseRequest = (function() { + + /** + * Properties of an UpdateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IUpdateUserListDirectLicenseRequest + * @property {google.ads.datamanager.v1.IUserListDirectLicense|null} [userListDirectLicense] UpdateUserListDirectLicenseRequest userListDirectLicense + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListDirectLicenseRequest updateMask + */ + + /** + * Constructs a new UpdateUserListDirectLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an UpdateUserListDirectLicenseRequest. + * @implements IUpdateUserListDirectLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set + */ + function UpdateUserListDirectLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserListDirectLicenseRequest userListDirectLicense. + * @member {google.ads.datamanager.v1.IUserListDirectLicense|null|undefined} userListDirectLicense + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + */ + UpdateUserListDirectLicenseRequest.prototype.userListDirectLicense = null; + + /** + * UpdateUserListDirectLicenseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + */ + UpdateUserListDirectLicenseRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateUserListDirectLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest instance + */ + UpdateUserListDirectLicenseRequest.create = function create(properties) { + return new UpdateUserListDirectLicenseRequest(properties); + }; + + /** + * Encodes the specified UpdateUserListDirectLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListDirectLicenseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListDirectLicense != null && Object.hasOwnProperty.call(message, "userListDirectLicense")) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicense, 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 UpdateUserListDirectLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListDirectLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserListDirectLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @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.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListDirectLicenseRequest.decode = function decode(reader, 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.UpdateUserListDirectLicenseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.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 UpdateUserListDirectLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListDirectLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserListDirectLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserListDirectLicenseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicense); + if (error) + return "userListDirectLicense." + 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 UpdateUserListDirectLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} UpdateUserListDirectLicenseRequest + */ + UpdateUserListDirectLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest(); + if (object.userListDirectLicense != null) { + if (typeof object.userListDirectLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.userListDirectLicense: object expected"); + message.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicense); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserListDirectLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest} message UpdateUserListDirectLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserListDirectLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userListDirectLicense = null; + object.updateMask = null; + } + if (message.userListDirectLicense != null && message.hasOwnProperty("userListDirectLicense")) + object.userListDirectLicense = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicense, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateUserListDirectLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserListDirectLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserListDirectLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserListDirectLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListDirectLicenseRequest"; + }; + + return UpdateUserListDirectLicenseRequest; + })(); + + v1.ListUserListDirectLicensesRequest = (function() { + + /** + * Properties of a ListUserListDirectLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListDirectLicensesRequest + * @property {string|null} [parent] ListUserListDirectLicensesRequest parent + * @property {string|null} [filter] ListUserListDirectLicensesRequest filter + * @property {number|null} [pageSize] ListUserListDirectLicensesRequest pageSize + * @property {string|null} [pageToken] ListUserListDirectLicensesRequest pageToken + */ + + /** + * Constructs a new ListUserListDirectLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListDirectLicensesRequest. + * @implements IListUserListDirectLicensesRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set + */ + function ListUserListDirectLicensesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListDirectLicensesRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.parent = ""; + + /** + * ListUserListDirectLicensesRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.filter = ""; + + /** + * ListUserListDirectLicensesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.pageSize = 0; + + /** + * ListUserListDirectLicensesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + */ + ListUserListDirectLicensesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListDirectLicensesRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest instance + */ + ListUserListDirectLicensesRequest.create = function create(properties) { + return new ListUserListDirectLicensesRequest(properties); + }; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListDirectLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @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.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesRequest.decode = function decode(reader, 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.ListUserListDirectLicensesRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListDirectLicensesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListDirectLicensesRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListDirectLicensesRequest.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.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 ListUserListDirectLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} ListUserListDirectLicensesRequest + */ + ListUserListDirectLicensesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListDirectLicensesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesRequest} message ListUserListDirectLicensesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListDirectLicensesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListDirectLicensesRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListDirectLicensesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListDirectLicensesRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListDirectLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesRequest"; + }; + + return ListUserListDirectLicensesRequest; + })(); + + v1.ListUserListDirectLicensesResponse = (function() { + + /** + * Properties of a ListUserListDirectLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListDirectLicensesResponse + * @property {Array.|null} [userListDirectLicenses] ListUserListDirectLicensesResponse userListDirectLicenses + * @property {string|null} [nextPageToken] ListUserListDirectLicensesResponse nextPageToken + */ + + /** + * Constructs a new ListUserListDirectLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListDirectLicensesResponse. + * @implements IListUserListDirectLicensesResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set + */ + function ListUserListDirectLicensesResponse(properties) { + this.userListDirectLicenses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListDirectLicensesResponse userListDirectLicenses. + * @member {Array.} userListDirectLicenses + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + */ + ListUserListDirectLicensesResponse.prototype.userListDirectLicenses = $util.emptyArray; + + /** + * ListUserListDirectLicensesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + */ + ListUserListDirectLicensesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListDirectLicensesResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse instance + */ + ListUserListDirectLicensesResponse.create = function create(properties) { + return new ListUserListDirectLicensesResponse(properties); + }; + + /** + * Encodes the specified ListUserListDirectLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListDirectLicenses != null && message.userListDirectLicenses.length) + for (var i = 0; i < message.userListDirectLicenses.length; ++i) + $root.google.ads.datamanager.v1.UserListDirectLicense.encode(message.userListDirectLicenses[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 ListUserListDirectLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListDirectLicensesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListDirectLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @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.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesResponse.decode = function decode(reader, 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.ListUserListDirectLicensesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListDirectLicenses && message.userListDirectLicenses.length)) + message.userListDirectLicenses = []; + message.userListDirectLicenses.push($root.google.ads.datamanager.v1.UserListDirectLicense.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListDirectLicensesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListDirectLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListDirectLicensesResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListDirectLicensesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListDirectLicenses != null && message.hasOwnProperty("userListDirectLicenses")) { + if (!Array.isArray(message.userListDirectLicenses)) + return "userListDirectLicenses: array expected"; + for (var i = 0; i < message.userListDirectLicenses.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListDirectLicense.verify(message.userListDirectLicenses[i]); + if (error) + return "userListDirectLicenses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListDirectLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} ListUserListDirectLicensesResponse + */ + ListUserListDirectLicensesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListDirectLicensesResponse(); + if (object.userListDirectLicenses) { + if (!Array.isArray(object.userListDirectLicenses)) + throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: array expected"); + message.userListDirectLicenses = []; + for (var i = 0; i < object.userListDirectLicenses.length; ++i) { + if (typeof object.userListDirectLicenses[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListDirectLicensesResponse.userListDirectLicenses: object expected"); + message.userListDirectLicenses[i] = $root.google.ads.datamanager.v1.UserListDirectLicense.fromObject(object.userListDirectLicenses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListDirectLicensesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListDirectLicensesResponse} message ListUserListDirectLicensesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListDirectLicensesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListDirectLicenses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListDirectLicenses && message.userListDirectLicenses.length) { + object.userListDirectLicenses = []; + for (var j = 0; j < message.userListDirectLicenses.length; ++j) + object.userListDirectLicenses[j] = $root.google.ads.datamanager.v1.UserListDirectLicense.toObject(message.userListDirectLicenses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListDirectLicensesResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListDirectLicensesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListDirectLicensesResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListDirectLicensesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListDirectLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListDirectLicensesResponse"; + }; + + return ListUserListDirectLicensesResponse; + })(); + + v1.UserListGlobalLicense = (function() { + + /** + * Properties of a UserListGlobalLicense. + * @memberof google.ads.datamanager.v1 + * @interface IUserListGlobalLicense + * @property {string|null} [name] UserListGlobalLicense name + * @property {number|Long|null} [userListId] UserListGlobalLicense userListId + * @property {string|null} [userListDisplayName] UserListGlobalLicense userListDisplayName + * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicense licenseType + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicense status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicense pricing + * @property {Array.|null} [historicalPricings] UserListGlobalLicense historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicense metrics + */ + + /** + * Constructs a new UserListGlobalLicense. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicense. + * @implements IUserListGlobalLicense + * @constructor + * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set + */ + function UserListGlobalLicense(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListGlobalLicense name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.name = ""; + + /** + * UserListGlobalLicense userListId. + * @member {number|Long|null|undefined} userListId + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.userListId = null; + + /** + * UserListGlobalLicense userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.userListDisplayName = ""; + + /** + * UserListGlobalLicense licenseType. + * @member {google.ads.datamanager.v1.UserListGlobalLicenseType|null|undefined} licenseType + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.licenseType = null; + + /** + * UserListGlobalLicense status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus|null|undefined} status + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.status = null; + + /** + * UserListGlobalLicense pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.pricing = null; + + /** + * UserListGlobalLicense historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListGlobalLicense metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + */ + UserListGlobalLicense.prototype.metrics = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_userListId", { + get: $util.oneOfGetter($oneOfFields = ["userListId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_licenseType", { + get: $util.oneOfGetter($oneOfFields = ["licenseType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserListGlobalLicense.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserListGlobalLicense instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense instance + */ + UserListGlobalLicense.create = function create(properties) { + return new UserListGlobalLicense(properties); + }; + + /** + * Encodes the specified UserListGlobalLicense message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicense.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListGlobalLicense message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicense.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicense} message UserListGlobalLicense message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicense.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @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.UserListGlobalLicense} UserListGlobalLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicense.decode = function decode(reader, 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.UserListGlobalLicense(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.licenseType = reader.int32(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 8: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListGlobalLicense message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicense.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListGlobalLicense message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListGlobalLicense.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.userListId != null && message.hasOwnProperty("userListId")) { + properties._userListId = 1; + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) { + properties._licenseType = 1; + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListGlobalLicense message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListGlobalLicense} UserListGlobalLicense + */ + UserListGlobalLicense.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicense) + return object; + var message = new $root.google.ads.datamanager.v1.UserListGlobalLicense(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": + case 1: + message.licenseType = 1; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": + case 2: + message.licenseType = 2; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": + case 3: + message.licenseType = 3; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicense.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListGlobalLicense message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {google.ads.datamanager.v1.UserListGlobalLicense} message UserListGlobalLicense + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListGlobalLicense.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + object.userListDisplayName = ""; + object.pricing = null; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) { + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (options.oneofs) + object._userListId = "userListId"; + } + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) { + object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; + if (options.oneofs) + object._licenseType = "licenseType"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListGlobalLicense to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @instance + * @returns {Object.} JSON object + */ + UserListGlobalLicense.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListGlobalLicense + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListGlobalLicense + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListGlobalLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicense"; + }; + + return UserListGlobalLicense; + })(); + + v1.UserListGlobalLicenseCustomerInfo = (function() { + + /** + * Properties of a UserListGlobalLicenseCustomerInfo. + * @memberof google.ads.datamanager.v1 + * @interface IUserListGlobalLicenseCustomerInfo + * @property {string|null} [name] UserListGlobalLicenseCustomerInfo name + * @property {number|Long|null} [userListId] UserListGlobalLicenseCustomerInfo userListId + * @property {string|null} [userListDisplayName] UserListGlobalLicenseCustomerInfo userListDisplayName + * @property {google.ads.datamanager.v1.UserListGlobalLicenseType|null} [licenseType] UserListGlobalLicenseCustomerInfo licenseType + * @property {google.ads.datamanager.v1.UserListLicenseStatus|null} [status] UserListGlobalLicenseCustomerInfo status + * @property {google.ads.datamanager.v1.IUserListLicensePricing|null} [pricing] UserListGlobalLicenseCustomerInfo pricing + * @property {google.ads.datamanager.v1.UserListLicenseClientAccountType|null} [clientAccountType] UserListGlobalLicenseCustomerInfo clientAccountType + * @property {number|Long|null} [clientAccountId] UserListGlobalLicenseCustomerInfo clientAccountId + * @property {string|null} [clientAccountDisplayName] UserListGlobalLicenseCustomerInfo clientAccountDisplayName + * @property {Array.|null} [historicalPricings] UserListGlobalLicenseCustomerInfo historicalPricings + * @property {google.ads.datamanager.v1.IUserListLicenseMetrics|null} [metrics] UserListGlobalLicenseCustomerInfo metrics + */ + + /** + * Constructs a new UserListGlobalLicenseCustomerInfo. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicenseCustomerInfo. + * @implements IUserListGlobalLicenseCustomerInfo + * @constructor + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set + */ + function UserListGlobalLicenseCustomerInfo(properties) { + this.historicalPricings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserListGlobalLicenseCustomerInfo name. + * @member {string} name + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.name = ""; + + /** + * UserListGlobalLicenseCustomerInfo userListId. + * @member {number|Long} userListId + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.userListId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListGlobalLicenseCustomerInfo userListDisplayName. + * @member {string} userListDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.userListDisplayName = ""; + + /** + * UserListGlobalLicenseCustomerInfo licenseType. + * @member {google.ads.datamanager.v1.UserListGlobalLicenseType} licenseType + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.licenseType = 0; + + /** + * UserListGlobalLicenseCustomerInfo status. + * @member {google.ads.datamanager.v1.UserListLicenseStatus} status + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.status = 0; + + /** + * UserListGlobalLicenseCustomerInfo pricing. + * @member {google.ads.datamanager.v1.IUserListLicensePricing|null|undefined} pricing + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.pricing = null; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountType. + * @member {google.ads.datamanager.v1.UserListLicenseClientAccountType} clientAccountType + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountType = 0; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountId. + * @member {number|Long} clientAccountId + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UserListGlobalLicenseCustomerInfo clientAccountDisplayName. + * @member {string} clientAccountDisplayName + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.clientAccountDisplayName = ""; + + /** + * UserListGlobalLicenseCustomerInfo historicalPricings. + * @member {Array.} historicalPricings + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.historicalPricings = $util.emptyArray; + + /** + * UserListGlobalLicenseCustomerInfo metrics. + * @member {google.ads.datamanager.v1.IUserListLicenseMetrics|null|undefined} metrics + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + */ + UserListGlobalLicenseCustomerInfo.prototype.metrics = null; + + /** + * Creates a new UserListGlobalLicenseCustomerInfo instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo instance + */ + UserListGlobalLicenseCustomerInfo.create = function create(properties) { + return new UserListGlobalLicenseCustomerInfo(properties); + }; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicenseCustomerInfo.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.userListId != null && Object.hasOwnProperty.call(message, "userListId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userListId); + if (message.userListDisplayName != null && Object.hasOwnProperty.call(message, "userListDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userListDisplayName); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.licenseType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.pricing != null && Object.hasOwnProperty.call(message, "pricing")) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.pricing, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.clientAccountType != null && Object.hasOwnProperty.call(message, "clientAccountType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.clientAccountType); + if (message.clientAccountId != null && Object.hasOwnProperty.call(message, "clientAccountId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.clientAccountId); + if (message.clientAccountDisplayName != null && Object.hasOwnProperty.call(message, "clientAccountDisplayName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.clientAccountDisplayName); + if (message.historicalPricings != null && message.historicalPricings.length) + for (var i = 0; i < message.historicalPricings.length; ++i) + $root.google.ads.datamanager.v1.UserListLicensePricing.encode(message.historicalPricings[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.ads.datamanager.v1.UserListLicenseMetrics.encode(message.metrics, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserListGlobalLicenseCustomerInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.IUserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserListGlobalLicenseCustomerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @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.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicenseCustomerInfo.decode = function decode(reader, 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.UserListGlobalLicenseCustomerInfo(); + 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.userListId = reader.int64(); + break; + } + case 3: { + message.userListDisplayName = reader.string(); + break; + } + case 4: { + message.licenseType = reader.int32(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32()); + break; + } + case 7: { + message.clientAccountType = reader.int32(); + break; + } + case 8: { + message.clientAccountId = reader.int64(); + break; + } + case 9: { + message.clientAccountDisplayName = reader.string(); + break; + } + case 10: { + if (!(message.historicalPricings && message.historicalPricings.length)) + message.historicalPricings = []; + message.historicalPricings.push($root.google.ads.datamanager.v1.UserListLicensePricing.decode(reader, reader.uint32())); + break; + } + case 11: { + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserListGlobalLicenseCustomerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserListGlobalLicenseCustomerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserListGlobalLicenseCustomerInfo message. + * @function verify + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserListGlobalLicenseCustomerInfo.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.userListId != null && message.hasOwnProperty("userListId")) + if (!$util.isInteger(message.userListId) && !(message.userListId && $util.isInteger(message.userListId.low) && $util.isInteger(message.userListId.high))) + return "userListId: integer|Long expected"; + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + if (!$util.isString(message.userListDisplayName)) + return "userListDisplayName: string expected"; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + 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.pricing != null && message.hasOwnProperty("pricing")) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.pricing); + if (error) + return "pricing." + error; + } + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) + switch (message.clientAccountType) { + default: + return "clientAccountType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) + if (!$util.isInteger(message.clientAccountId) && !(message.clientAccountId && $util.isInteger(message.clientAccountId.low) && $util.isInteger(message.clientAccountId.high))) + return "clientAccountId: integer|Long expected"; + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + if (!$util.isString(message.clientAccountDisplayName)) + return "clientAccountDisplayName: string expected"; + if (message.historicalPricings != null && message.hasOwnProperty("historicalPricings")) { + if (!Array.isArray(message.historicalPricings)) + return "historicalPricings: array expected"; + for (var i = 0; i < message.historicalPricings.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListLicensePricing.verify(message.historicalPricings[i]); + if (error) + return "historicalPricings." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.ads.datamanager.v1.UserListLicenseMetrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a UserListGlobalLicenseCustomerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} UserListGlobalLicenseCustomerInfo + */ + UserListGlobalLicenseCustomerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo) + return object; + var message = new $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.userListId != null) + if ($util.Long) + (message.userListId = $util.Long.fromValue(object.userListId)).unsigned = false; + else if (typeof object.userListId === "string") + message.userListId = parseInt(object.userListId, 10); + else if (typeof object.userListId === "number") + message.userListId = object.userListId; + else if (typeof object.userListId === "object") + message.userListId = new $util.LongBits(object.userListId.low >>> 0, object.userListId.high >>> 0).toNumber(); + if (object.userListDisplayName != null) + message.userListDisplayName = String(object.userListDisplayName); + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": + case 1: + message.licenseType = 1; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": + case 2: + message.licenseType = 2; + break; + case "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": + case 3: + message.licenseType = 3; + break; + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "USER_LIST_LICENSE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "USER_LIST_LICENSE_STATUS_ENABLED": + case 1: + message.status = 1; + break; + case "USER_LIST_LICENSE_STATUS_DISABLED": + case 2: + message.status = 2; + break; + } + if (object.pricing != null) { + if (typeof object.pricing !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.pricing: object expected"); + message.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.pricing); + } + switch (object.clientAccountType) { + default: + if (typeof object.clientAccountType === "number") { + message.clientAccountType = object.clientAccountType; + break; + } + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": + case 0: + message.clientAccountType = 0; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": + case 1: + message.clientAccountType = 1; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": + case 2: + message.clientAccountType = 2; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": + case 3: + message.clientAccountType = 3; + break; + case "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": + case 4: + message.clientAccountType = 4; + break; + } + if (object.clientAccountId != null) + if ($util.Long) + (message.clientAccountId = $util.Long.fromValue(object.clientAccountId)).unsigned = false; + else if (typeof object.clientAccountId === "string") + message.clientAccountId = parseInt(object.clientAccountId, 10); + else if (typeof object.clientAccountId === "number") + message.clientAccountId = object.clientAccountId; + else if (typeof object.clientAccountId === "object") + message.clientAccountId = new $util.LongBits(object.clientAccountId.low >>> 0, object.clientAccountId.high >>> 0).toNumber(); + if (object.clientAccountDisplayName != null) + message.clientAccountDisplayName = String(object.clientAccountDisplayName); + if (object.historicalPricings) { + if (!Array.isArray(object.historicalPricings)) + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: array expected"); + message.historicalPricings = []; + for (var i = 0; i < object.historicalPricings.length; ++i) { + if (typeof object.historicalPricings[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.historicalPricings: object expected"); + message.historicalPricings[i] = $root.google.ads.datamanager.v1.UserListLicensePricing.fromObject(object.historicalPricings[i]); + } + } + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.metrics: object expected"); + message.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a UserListGlobalLicenseCustomerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo} message UserListGlobalLicenseCustomerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserListGlobalLicenseCustomerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.historicalPricings = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.userListId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.userListId = options.longs === String ? "0" : 0; + object.userListDisplayName = ""; + object.licenseType = options.enums === String ? "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED" : 0; + object.status = options.enums === String ? "USER_LIST_LICENSE_STATUS_UNSPECIFIED" : 0; + object.pricing = null; + object.clientAccountType = options.enums === String ? "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.clientAccountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.clientAccountId = options.longs === String ? "0" : 0; + object.clientAccountDisplayName = ""; + object.metrics = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userListId != null && message.hasOwnProperty("userListId")) + if (typeof message.userListId === "number") + object.userListId = options.longs === String ? String(message.userListId) : message.userListId; + else + object.userListId = options.longs === String ? $util.Long.prototype.toString.call(message.userListId) : options.longs === Number ? new $util.LongBits(message.userListId.low >>> 0, message.userListId.high >>> 0).toNumber() : message.userListId; + if (message.userListDisplayName != null && message.hasOwnProperty("userListDisplayName")) + object.userListDisplayName = message.userListDisplayName; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + object.licenseType = options.enums === String ? $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.ads.datamanager.v1.UserListGlobalLicenseType[message.licenseType] : message.licenseType; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] === undefined ? message.status : $root.google.ads.datamanager.v1.UserListLicenseStatus[message.status] : message.status; + if (message.pricing != null && message.hasOwnProperty("pricing")) + object.pricing = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.pricing, options); + if (message.clientAccountType != null && message.hasOwnProperty("clientAccountType")) + object.clientAccountType = options.enums === String ? $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] === undefined ? message.clientAccountType : $root.google.ads.datamanager.v1.UserListLicenseClientAccountType[message.clientAccountType] : message.clientAccountType; + if (message.clientAccountId != null && message.hasOwnProperty("clientAccountId")) + if (typeof message.clientAccountId === "number") + object.clientAccountId = options.longs === String ? String(message.clientAccountId) : message.clientAccountId; + else + object.clientAccountId = options.longs === String ? $util.Long.prototype.toString.call(message.clientAccountId) : options.longs === Number ? new $util.LongBits(message.clientAccountId.low >>> 0, message.clientAccountId.high >>> 0).toNumber() : message.clientAccountId; + if (message.clientAccountDisplayName != null && message.hasOwnProperty("clientAccountDisplayName")) + object.clientAccountDisplayName = message.clientAccountDisplayName; + if (message.historicalPricings && message.historicalPricings.length) { + object.historicalPricings = []; + for (var j = 0; j < message.historicalPricings.length; ++j) + object.historicalPricings[j] = $root.google.ads.datamanager.v1.UserListLicensePricing.toObject(message.historicalPricings[j], options); + } + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.ads.datamanager.v1.UserListLicenseMetrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this UserListGlobalLicenseCustomerInfo to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @instance + * @returns {Object.} JSON object + */ + UserListGlobalLicenseCustomerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserListGlobalLicenseCustomerInfo + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserListGlobalLicenseCustomerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo"; + }; + + return UserListGlobalLicenseCustomerInfo; + })(); + + /** + * UserListGlobalLicenseType enum. + * @name google.ads.datamanager.v1.UserListGlobalLicenseType + * @enum {number} + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED=0 USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER=1 USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE=2 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE value + * @property {number} USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE=3 USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE value + */ + v1.UserListGlobalLicenseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER"] = 1; + values[valuesById[2] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE"] = 2; + values[valuesById[3] = "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE"] = 3; + return values; + })(); + + v1.UserListGlobalLicenseService = (function() { + + /** + * Constructs a new UserListGlobalLicenseService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListGlobalLicenseService + * @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 UserListGlobalLicenseService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListGlobalLicenseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListGlobalLicenseService; + + /** + * Creates new UserListGlobalLicenseService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @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 {UserListGlobalLicenseService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListGlobalLicenseService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|createUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef CreateUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls CreateUserListGlobalLicense. + * @function createUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.createUserListGlobalLicense = function createUserListGlobalLicense(request, callback) { + return this.rpcCall(createUserListGlobalLicense, $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "CreateUserListGlobalLicense" }); + + /** + * Calls CreateUserListGlobalLicense. + * @function createUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} request CreateUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|updateUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef UpdateUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls UpdateUserListGlobalLicense. + * @function updateUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.updateUserListGlobalLicense = function updateUserListGlobalLicense(request, callback) { + return this.rpcCall(updateUserListGlobalLicense, $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "UpdateUserListGlobalLicense" }); + + /** + * Calls UpdateUserListGlobalLicense. + * @function updateUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} request UpdateUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|getUserListGlobalLicense}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef GetUserListGlobalLicenseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserListGlobalLicense} [response] UserListGlobalLicense + */ + + /** + * Calls GetUserListGlobalLicense. + * @function getUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicenseCallback} callback Node-style callback called with the error, if any, and UserListGlobalLicense + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.getUserListGlobalLicense = function getUserListGlobalLicense(request, callback) { + return this.rpcCall(getUserListGlobalLicense, $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest, $root.google.ads.datamanager.v1.UserListGlobalLicense, request, callback); + }, "name", { value: "GetUserListGlobalLicense" }); + + /** + * Calls GetUserListGlobalLicense. + * @function getUserListGlobalLicense + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} request GetUserListGlobalLicenseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenses}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef ListUserListGlobalLicensesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} [response] ListUserListGlobalLicensesResponse + */ + + /** + * Calls ListUserListGlobalLicenses. + * @function listUserListGlobalLicenses + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicensesCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicensesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenses = function listUserListGlobalLicenses(request, callback) { + return this.rpcCall(listUserListGlobalLicenses, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse, request, callback); + }, "name", { value: "ListUserListGlobalLicenses" }); + + /** + * Calls ListUserListGlobalLicenses. + * @function listUserListGlobalLicenses + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} request ListUserListGlobalLicensesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListGlobalLicenseService|listUserListGlobalLicenseCustomerInfos}. + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @typedef ListUserListGlobalLicenseCustomerInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} [response] ListUserListGlobalLicenseCustomerInfosResponse + */ + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @function listUserListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @param {google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfosCallback} callback Node-style callback called with the error, if any, and ListUserListGlobalLicenseCustomerInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListGlobalLicenseService.prototype.listUserListGlobalLicenseCustomerInfos = function listUserListGlobalLicenseCustomerInfos(request, callback) { + return this.rpcCall(listUserListGlobalLicenseCustomerInfos, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest, $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse, request, callback); + }, "name", { value: "ListUserListGlobalLicenseCustomerInfos" }); + + /** + * Calls ListUserListGlobalLicenseCustomerInfos. + * @function listUserListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.UserListGlobalLicenseService + * @instance + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} request ListUserListGlobalLicenseCustomerInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListGlobalLicenseService; + })(); + + v1.CreateUserListGlobalLicenseRequest = (function() { + + /** + * Properties of a CreateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface ICreateUserListGlobalLicenseRequest + * @property {string|null} [parent] CreateUserListGlobalLicenseRequest parent + * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] CreateUserListGlobalLicenseRequest userListGlobalLicense + */ + + /** + * Constructs a new CreateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a CreateUserListGlobalLicenseRequest. + * @implements ICreateUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function CreateUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserListGlobalLicenseRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + */ + CreateUserListGlobalLicenseRequest.prototype.parent = ""; + + /** + * CreateUserListGlobalLicenseRequest userListGlobalLicense. + * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + */ + CreateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; + + /** + * Creates a new CreateUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest instance + */ + CreateUserListGlobalLicenseRequest.create = function create(properties) { + return new CreateUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.ICreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @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.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListGlobalLicenseRequest.decode = function decode(reader, 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.CreateUserListGlobalLicenseRequest(); + 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.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserListGlobalLicenseRequest.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.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); + if (error) + return "userListGlobalLicense." + error; + } + return null; + }; + + /** + * Creates a CreateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} CreateUserListGlobalLicenseRequest + */ + CreateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userListGlobalLicense != null) { + if (typeof object.userListGlobalLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest} message CreateUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userListGlobalLicense = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) + object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); + return object; + }; + + /** + * Converts this CreateUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListGlobalLicenseRequest"; + }; + + return CreateUserListGlobalLicenseRequest; + })(); + + v1.UpdateUserListGlobalLicenseRequest = (function() { + + /** + * Properties of an UpdateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IUpdateUserListGlobalLicenseRequest + * @property {google.ads.datamanager.v1.IUserListGlobalLicense|null} [userListGlobalLicense] UpdateUserListGlobalLicenseRequest userListGlobalLicense + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListGlobalLicenseRequest updateMask + */ + + /** + * Constructs a new UpdateUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents an UpdateUserListGlobalLicenseRequest. + * @implements IUpdateUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function UpdateUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserListGlobalLicenseRequest userListGlobalLicense. + * @member {google.ads.datamanager.v1.IUserListGlobalLicense|null|undefined} userListGlobalLicense + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + */ + UpdateUserListGlobalLicenseRequest.prototype.userListGlobalLicense = null; + + /** + * UpdateUserListGlobalLicenseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + */ + UpdateUserListGlobalLicenseRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest instance + */ + UpdateUserListGlobalLicenseRequest.create = function create(properties) { + return new UpdateUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified UpdateUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListGlobalLicenseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicense != null && Object.hasOwnProperty.call(message, "userListGlobalLicense")) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicense, 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 UpdateUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IUpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @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.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListGlobalLicenseRequest.decode = function decode(reader, 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.UpdateUserListGlobalLicenseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.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 UpdateUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserListGlobalLicenseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicense); + if (error) + return "userListGlobalLicense." + 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 UpdateUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} UpdateUserListGlobalLicenseRequest + */ + UpdateUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest(); + if (object.userListGlobalLicense != null) { + if (typeof object.userListGlobalLicense !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.userListGlobalLicense: object expected"); + message.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicense); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest} message UpdateUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserListGlobalLicenseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userListGlobalLicense = null; + object.updateMask = null; + } + if (message.userListGlobalLicense != null && message.hasOwnProperty("userListGlobalLicense")) + object.userListGlobalLicense = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicense, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest"; + }; + + return UpdateUserListGlobalLicenseRequest; + })(); + + v1.GetUserListGlobalLicenseRequest = (function() { + + /** + * Properties of a GetUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListGlobalLicenseRequest + * @property {string|null} [name] GetUserListGlobalLicenseRequest name + */ + + /** + * Constructs a new GetUserListGlobalLicenseRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListGlobalLicenseRequest. + * @implements IGetUserListGlobalLicenseRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set + */ + function GetUserListGlobalLicenseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListGlobalLicenseRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @instance + */ + GetUserListGlobalLicenseRequest.prototype.name = ""; + + /** + * Creates a new GetUserListGlobalLicenseRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest instance + */ + GetUserListGlobalLicenseRequest.create = function create(properties) { + return new GetUserListGlobalLicenseRequest(properties); + }; + + /** + * Encodes the specified GetUserListGlobalLicenseRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListGlobalLicenseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListGlobalLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserListGlobalLicenseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @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.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListGlobalLicenseRequest.decode = function decode(reader, 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.GetUserListGlobalLicenseRequest(); + 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 GetUserListGlobalLicenseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListGlobalLicenseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListGlobalLicenseRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} GetUserListGlobalLicenseRequest + */ + GetUserListGlobalLicenseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListGlobalLicenseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListGlobalLicenseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListGlobalLicenseRequest} message GetUserListGlobalLicenseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListGlobalLicenseRequest.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 GetUserListGlobalLicenseRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListGlobalLicenseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListGlobalLicenseRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListGlobalLicenseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListGlobalLicenseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListGlobalLicenseRequest"; + }; + + return GetUserListGlobalLicenseRequest; + })(); + + v1.ListUserListGlobalLicensesRequest = (function() { + + /** + * Properties of a ListUserListGlobalLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicensesRequest + * @property {string|null} [parent] ListUserListGlobalLicensesRequest parent + * @property {string|null} [filter] ListUserListGlobalLicensesRequest filter + * @property {number|null} [pageSize] ListUserListGlobalLicensesRequest pageSize + * @property {string|null} [pageToken] ListUserListGlobalLicensesRequest pageToken + */ + + /** + * Constructs a new ListUserListGlobalLicensesRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicensesRequest. + * @implements IListUserListGlobalLicensesRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set + */ + function ListUserListGlobalLicensesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicensesRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.parent = ""; + + /** + * ListUserListGlobalLicensesRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.filter = ""; + + /** + * ListUserListGlobalLicensesRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.pageSize = 0; + + /** + * ListUserListGlobalLicensesRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + */ + ListUserListGlobalLicensesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListGlobalLicensesRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest instance + */ + ListUserListGlobalLicensesRequest.create = function create(properties) { + return new ListUserListGlobalLicensesRequest(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListGlobalLicensesRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @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.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesRequest.decode = function decode(reader, 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.ListUserListGlobalLicensesRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicensesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicensesRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicensesRequest.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.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 ListUserListGlobalLicensesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} ListUserListGlobalLicensesRequest + */ + ListUserListGlobalLicensesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListGlobalLicensesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesRequest} message ListUserListGlobalLicensesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicensesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListGlobalLicensesRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicensesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicensesRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicensesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesRequest"; + }; + + return ListUserListGlobalLicensesRequest; + })(); + + v1.ListUserListGlobalLicensesResponse = (function() { + + /** + * Properties of a ListUserListGlobalLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicensesResponse + * @property {Array.|null} [userListGlobalLicenses] ListUserListGlobalLicensesResponse userListGlobalLicenses + * @property {string|null} [nextPageToken] ListUserListGlobalLicensesResponse nextPageToken + */ + + /** + * Constructs a new ListUserListGlobalLicensesResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicensesResponse. + * @implements IListUserListGlobalLicensesResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set + */ + function ListUserListGlobalLicensesResponse(properties) { + this.userListGlobalLicenses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicensesResponse userListGlobalLicenses. + * @member {Array.} userListGlobalLicenses + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + */ + ListUserListGlobalLicensesResponse.prototype.userListGlobalLicenses = $util.emptyArray; + + /** + * ListUserListGlobalLicensesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + */ + ListUserListGlobalLicensesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListGlobalLicensesResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse instance + */ + ListUserListGlobalLicensesResponse.create = function create(properties) { + return new ListUserListGlobalLicensesResponse(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicensesResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicenses != null && message.userListGlobalLicenses.length) + for (var i = 0; i < message.userListGlobalLicenses.length; ++i) + $root.google.ads.datamanager.v1.UserListGlobalLicense.encode(message.userListGlobalLicenses[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 ListUserListGlobalLicensesResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @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.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesResponse.decode = function decode(reader, 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.ListUserListGlobalLicensesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListGlobalLicenses && message.userListGlobalLicenses.length)) + message.userListGlobalLicenses = []; + message.userListGlobalLicenses.push($root.google.ads.datamanager.v1.UserListGlobalLicense.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicensesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicensesResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicensesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicenses != null && message.hasOwnProperty("userListGlobalLicenses")) { + if (!Array.isArray(message.userListGlobalLicenses)) + return "userListGlobalLicenses: array expected"; + for (var i = 0; i < message.userListGlobalLicenses.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicense.verify(message.userListGlobalLicenses[i]); + if (error) + return "userListGlobalLicenses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListGlobalLicensesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} ListUserListGlobalLicensesResponse + */ + ListUserListGlobalLicensesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicensesResponse(); + if (object.userListGlobalLicenses) { + if (!Array.isArray(object.userListGlobalLicenses)) + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: array expected"); + message.userListGlobalLicenses = []; + for (var i = 0; i < object.userListGlobalLicenses.length; ++i) { + if (typeof object.userListGlobalLicenses[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse.userListGlobalLicenses: object expected"); + message.userListGlobalLicenses[i] = $root.google.ads.datamanager.v1.UserListGlobalLicense.fromObject(object.userListGlobalLicenses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListGlobalLicensesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicensesResponse} message ListUserListGlobalLicensesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicensesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListGlobalLicenses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListGlobalLicenses && message.userListGlobalLicenses.length) { + object.userListGlobalLicenses = []; + for (var j = 0; j < message.userListGlobalLicenses.length; ++j) + object.userListGlobalLicenses[j] = $root.google.ads.datamanager.v1.UserListGlobalLicense.toObject(message.userListGlobalLicenses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListGlobalLicensesResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicensesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicensesResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicensesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicensesResponse"; + }; + + return ListUserListGlobalLicensesResponse; + })(); + + v1.ListUserListGlobalLicenseCustomerInfosRequest = (function() { + + /** + * Properties of a ListUserListGlobalLicenseCustomerInfosRequest. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicenseCustomerInfosRequest + * @property {string|null} [parent] ListUserListGlobalLicenseCustomerInfosRequest parent + * @property {string|null} [filter] ListUserListGlobalLicenseCustomerInfosRequest filter + * @property {number|null} [pageSize] ListUserListGlobalLicenseCustomerInfosRequest pageSize + * @property {string|null} [pageToken] ListUserListGlobalLicenseCustomerInfosRequest pageToken + */ + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosRequest. + * @implements IListUserListGlobalLicenseCustomerInfosRequest + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set + */ + function ListUserListGlobalLicenseCustomerInfosRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicenseCustomerInfosRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.parent = ""; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.filter = ""; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageSize = 0; + + /** + * ListUserListGlobalLicenseCustomerInfosRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest instance + */ + ListUserListGlobalLicenseCustomerInfosRequest.create = function create(properties) { + return new ListUserListGlobalLicenseCustomerInfosRequest(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); + return writer; + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @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.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosRequest.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosRequest(); + 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.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicenseCustomerInfosRequest.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.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 ListUserListGlobalLicenseCustomerInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} ListUserListGlobalLicenseCustomerInfosRequest + */ + ListUserListGlobalLicenseCustomerInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 ListUserListGlobalLicenseCustomerInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest} message ListUserListGlobalLicenseCustomerInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicenseCustomerInfosRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicenseCustomerInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicenseCustomerInfosRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosRequest"; + }; + + return ListUserListGlobalLicenseCustomerInfosRequest; + })(); + + v1.ListUserListGlobalLicenseCustomerInfosResponse = (function() { + + /** + * Properties of a ListUserListGlobalLicenseCustomerInfosResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListGlobalLicenseCustomerInfosResponse + * @property {Array.|null} [userListGlobalLicenseCustomerInfos] ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos + * @property {string|null} [nextPageToken] ListUserListGlobalLicenseCustomerInfosResponse nextPageToken + */ + + /** + * Constructs a new ListUserListGlobalLicenseCustomerInfosResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListGlobalLicenseCustomerInfosResponse. + * @implements IListUserListGlobalLicenseCustomerInfosResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set + */ + function ListUserListGlobalLicenseCustomerInfosResponse(properties) { + this.userListGlobalLicenseCustomerInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListGlobalLicenseCustomerInfosResponse userListGlobalLicenseCustomerInfos. + * @member {Array.} userListGlobalLicenseCustomerInfos + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.userListGlobalLicenseCustomerInfos = $util.emptyArray; + + /** + * ListUserListGlobalLicenseCustomerInfosResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListGlobalLicenseCustomerInfosResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse instance + */ + ListUserListGlobalLicenseCustomerInfosResponse.create = function create(properties) { + return new ListUserListGlobalLicenseCustomerInfosResponse(properties); + }; + + /** + * Encodes the specified ListUserListGlobalLicenseCustomerInfosResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userListGlobalLicenseCustomerInfos != null && message.userListGlobalLicenseCustomerInfos.length) + for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) + $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.encode(message.userListGlobalLicenseCustomerInfos[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 ListUserListGlobalLicenseCustomerInfosResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListGlobalLicenseCustomerInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @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.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosResponse.decode = function decode(reader, 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.ListUserListGlobalLicenseCustomerInfosResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length)) + message.userListGlobalLicenseCustomerInfos = []; + message.userListGlobalLicenseCustomerInfos.push($root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserListGlobalLicenseCustomerInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListGlobalLicenseCustomerInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListGlobalLicenseCustomerInfosResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListGlobalLicenseCustomerInfosResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userListGlobalLicenseCustomerInfos != null && message.hasOwnProperty("userListGlobalLicenseCustomerInfos")) { + if (!Array.isArray(message.userListGlobalLicenseCustomerInfos)) + return "userListGlobalLicenseCustomerInfos: array expected"; + for (var i = 0; i < message.userListGlobalLicenseCustomerInfos.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.verify(message.userListGlobalLicenseCustomerInfos[i]); + if (error) + return "userListGlobalLicenseCustomerInfos." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserListGlobalLicenseCustomerInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} ListUserListGlobalLicenseCustomerInfosResponse + */ + ListUserListGlobalLicenseCustomerInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse(); + if (object.userListGlobalLicenseCustomerInfos) { + if (!Array.isArray(object.userListGlobalLicenseCustomerInfos)) + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: array expected"); + message.userListGlobalLicenseCustomerInfos = []; + for (var i = 0; i < object.userListGlobalLicenseCustomerInfos.length; ++i) { + if (typeof object.userListGlobalLicenseCustomerInfos[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse.userListGlobalLicenseCustomerInfos: object expected"); + message.userListGlobalLicenseCustomerInfos[i] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.fromObject(object.userListGlobalLicenseCustomerInfos[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserListGlobalLicenseCustomerInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse} message ListUserListGlobalLicenseCustomerInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListGlobalLicenseCustomerInfosResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userListGlobalLicenseCustomerInfos = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userListGlobalLicenseCustomerInfos && message.userListGlobalLicenseCustomerInfos.length) { + object.userListGlobalLicenseCustomerInfos = []; + for (var j = 0; j < message.userListGlobalLicenseCustomerInfos.length; ++j) + object.userListGlobalLicenseCustomerInfos[j] = $root.google.ads.datamanager.v1.UserListGlobalLicenseCustomerInfo.toObject(message.userListGlobalLicenseCustomerInfos[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserListGlobalLicenseCustomerInfosResponse to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserListGlobalLicenseCustomerInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListGlobalLicenseCustomerInfosResponse + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListGlobalLicenseCustomerInfosResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse"; + }; + + return ListUserListGlobalLicenseCustomerInfosResponse; + })(); + + v1.UserListService = (function() { + + /** + * Constructs a new UserListService service. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a UserListService + * @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 UserListService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UserListService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserListService; + + /** + * Creates new UserListService service using the specified rpc implementation. + * @function create + * @memberof google.ads.datamanager.v1.UserListService + * @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 {UserListService} RPC service. Useful where requests and/or responses are streamed. + */ + UserListService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|getUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef GetUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls GetUserList. + * @function getUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.GetUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.getUserList = function getUserList(request, callback) { + return this.rpcCall(getUserList, $root.google.ads.datamanager.v1.GetUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "GetUserList" }); + + /** + * Calls GetUserList. + * @function getUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IGetUserListRequest} request GetUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|listUserLists}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef ListUserListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.ListUserListsResponse} [response] ListUserListsResponse + */ + + /** + * Calls ListUserLists. + * @function listUserLists + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.ListUserListsCallback} callback Node-style callback called with the error, if any, and ListUserListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.listUserLists = function listUserLists(request, callback) { + return this.rpcCall(listUserLists, $root.google.ads.datamanager.v1.ListUserListsRequest, $root.google.ads.datamanager.v1.ListUserListsResponse, request, callback); + }, "name", { value: "ListUserLists" }); + + /** + * Calls ListUserLists. + * @function listUserLists + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IListUserListsRequest} request ListUserListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|createUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef CreateUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls CreateUserList. + * @function createUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.CreateUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.createUserList = function createUserList(request, callback) { + return this.rpcCall(createUserList, $root.google.ads.datamanager.v1.CreateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "CreateUserList" }); + + /** + * Calls CreateUserList. + * @function createUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.ICreateUserListRequest} request CreateUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|updateUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef UpdateUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ads.datamanager.v1.UserList} [response] UserList + */ + + /** + * Calls UpdateUserList. + * @function updateUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.UpdateUserListCallback} callback Node-style callback called with the error, if any, and UserList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.updateUserList = function updateUserList(request, callback) { + return this.rpcCall(updateUserList, $root.google.ads.datamanager.v1.UpdateUserListRequest, $root.google.ads.datamanager.v1.UserList, request, callback); + }, "name", { value: "UpdateUserList" }); + + /** + * Calls UpdateUserList. + * @function updateUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} request UpdateUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ads.datamanager.v1.UserListService|deleteUserList}. + * @memberof google.ads.datamanager.v1.UserListService + * @typedef DeleteUserListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserList. + * @function deleteUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object + * @param {google.ads.datamanager.v1.UserListService.DeleteUserListCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UserListService.prototype.deleteUserList = function deleteUserList(request, callback) { + return this.rpcCall(deleteUserList, $root.google.ads.datamanager.v1.DeleteUserListRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserList" }); + + /** + * Calls DeleteUserList. + * @function deleteUserList + * @memberof google.ads.datamanager.v1.UserListService + * @instance + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} request DeleteUserListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UserListService; + })(); + + v1.GetUserListRequest = (function() { + + /** + * Properties of a GetUserListRequest. + * @memberof google.ads.datamanager.v1 + * @interface IGetUserListRequest + * @property {string|null} [name] GetUserListRequest name + */ + + /** + * Constructs a new GetUserListRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a GetUserListRequest. + * @implements IGetUserListRequest + * @constructor + * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set + */ + function GetUserListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserListRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @instance + */ + GetUserListRequest.prototype.name = ""; + + /** + * Creates a new GetUserListRequest instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest instance + */ + GetUserListRequest.create = function create(properties) { + return new GetUserListRequest(properties); + }; + + /** + * Encodes the specified GetUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListRequest.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 GetUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.GetUserListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.IGetUserListRequest} message GetUserListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Constructs a new ErrorCount. + * Decodes a GetUserListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @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.GetUserListRequest} GetUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListRequest.decode = function decode(reader, 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.GetUserListRequest(); + 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 GetUserListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserListRequest message. + * @function verify + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserListRequest.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 GetUserListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.GetUserListRequest} GetUserListRequest + */ + GetUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.GetUserListRequest) + return object; + var message = new $root.google.ads.datamanager.v1.GetUserListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {google.ads.datamanager.v1.GetUserListRequest} message GetUserListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserListRequest.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 GetUserListRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserListRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.GetUserListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.GetUserListRequest"; + }; + + return GetUserListRequest; + })(); + + v1.ListUserListsRequest = (function() { + + /** + * Properties of a ListUserListsRequest. * @memberof google.ads.datamanager.v1 - * @classdesc Represents an ErrorCount. - * @implements IErrorCount + * @interface IListUserListsRequest + * @property {string|null} [parent] ListUserListsRequest parent + * @property {number|null} [pageSize] ListUserListsRequest pageSize + * @property {string|null} [pageToken] ListUserListsRequest pageToken + * @property {string|null} [filter] ListUserListsRequest filter + */ + + /** + * Constructs a new ListUserListsRequest. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListsRequest. + * @implements IListUserListsRequest * @constructor - * @param {google.ads.datamanager.v1.IErrorCount=} [properties] Properties to set + * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set */ - function ErrorCount(properties) { + function ListUserListsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12790,91 +28968,119 @@ } /** - * ErrorCount recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.ErrorCount + * ListUserListsRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @instance */ - ErrorCount.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListUserListsRequest.prototype.parent = ""; /** - * ErrorCount reason. - * @member {google.ads.datamanager.v1.ProcessingErrorReason} reason - * @memberof google.ads.datamanager.v1.ErrorCount + * ListUserListsRequest pageSize. + * @member {number} pageSize + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @instance */ - ErrorCount.prototype.reason = 0; + ListUserListsRequest.prototype.pageSize = 0; /** - * Creates a new ErrorCount instance using the specified properties. + * ListUserListsRequest pageToken. + * @member {string} pageToken + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.pageToken = ""; + + /** + * ListUserListsRequest filter. + * @member {string} filter + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + */ + ListUserListsRequest.prototype.filter = ""; + + /** + * Creates a new ListUserListsRequest instance using the specified properties. * @function create - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @static - * @param {google.ads.datamanager.v1.IErrorCount=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount instance + * @param {google.ads.datamanager.v1.IListUserListsRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest instance */ - ErrorCount.create = function create(properties) { - return new ErrorCount(properties); + ListUserListsRequest.create = function create(properties) { + return new ListUserListsRequest(properties); }; /** - * Encodes the specified ErrorCount message. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * Encodes the specified ListUserListsRequest message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. * @function encode - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @static - * @param {google.ads.datamanager.v1.IErrorCount} message ErrorCount message or plain object to encode + * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorCount.encode = function encode(message, writer) { + ListUserListsRequest.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); + 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); return writer; }; /** - * Encodes the specified ErrorCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ErrorCount.verify|verify} messages. + * Encodes the specified ListUserListsRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @static - * @param {google.ads.datamanager.v1.IErrorCount} message ErrorCount message or plain object to encode + * @param {google.ads.datamanager.v1.IListUserListsRequest} message ListUserListsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorCount.encodeDelimited = function encodeDelimited(message, writer) { + ListUserListsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorCount message from the specified reader or buffer. + * Decodes a ListUserListsRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @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 + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest * @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) { + ListUserListsRequest.decode = function decode(reader, 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.ListUserListsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.recordCount = reader.int64(); + message.parent = reader.string(); break; } case 2: { - message.reason = reader.int32(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); break; } default: @@ -12886,295 +29092,399 @@ }; /** - * Decodes an ErrorCount message from the specified reader or buffer, length delimited. + * Decodes a ListUserListsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest * @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) { + ListUserListsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ErrorCount message. + * Verifies a ListUserListsRequest message. * @function verify - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsRequest * @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) { + ListUserListsRequest.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) { + 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"; + return null; + }; + + /** + * Creates a ListUserListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ads.datamanager.v1.ListUserListsRequest} ListUserListsRequest + */ + ListUserListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListsRequest) + return object; + var message = new $root.google.ads.datamanager.v1.ListUserListsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListUserListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {google.ads.datamanager.v1.ListUserListsRequest} message ListUserListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserListsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListUserListsRequest to JSON. + * @function toJSON + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserListsRequest + * @function getTypeUrl + * @memberof google.ads.datamanager.v1.ListUserListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsRequest"; + }; + + return ListUserListsRequest; + })(); + + v1.ListUserListsResponse = (function() { + + /** + * Properties of a ListUserListsResponse. + * @memberof google.ads.datamanager.v1 + * @interface IListUserListsResponse + * @property {Array.|null} [userLists] ListUserListsResponse userLists + * @property {string|null} [nextPageToken] ListUserListsResponse nextPageToken + */ + + /** + * Constructs a new ListUserListsResponse. + * @memberof google.ads.datamanager.v1 + * @classdesc Represents a ListUserListsResponse. + * @implements IListUserListsResponse + * @constructor + * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set + */ + function ListUserListsResponse(properties) { + this.userLists = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserListsResponse userLists. + * @member {Array.} userLists + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @instance + */ + ListUserListsResponse.prototype.userLists = $util.emptyArray; + + /** + * ListUserListsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @instance + */ + ListUserListsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserListsResponse instance using the specified properties. + * @function create + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse instance + */ + ListUserListsResponse.create = function create(properties) { + return new ListUserListsResponse(properties); + }; + + /** + * Encodes the specified ListUserListsResponse message. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @function encode + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLists != null && message.userLists.length) + for (var i = 0; i < message.userLists.length; ++i) + $root.google.ads.datamanager.v1.UserList.encode(message.userLists[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 ListUserListsResponse message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.ListUserListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {google.ads.datamanager.v1.IListUserListsResponse} message ListUserListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @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.ListUserListsResponse} ListUserListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsResponse.decode = function decode(reader, 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.ListUserListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.userLists && message.userLists.length)) + message.userLists = []; + message.userLists.push($root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } 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 27: - case 25: - case 26: + reader.skipType(tag & 7); break; } + } + return message; + }; + + /** + * Decodes a ListUserListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserListsResponse message. + * @function verify + * @memberof google.ads.datamanager.v1.ListUserListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLists != null && message.hasOwnProperty("userLists")) { + if (!Array.isArray(message.userLists)) + return "userLists: array expected"; + for (var i = 0; i < message.userLists.length; ++i) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userLists[i]); + if (error) + return "userLists." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ErrorCount message from a plain object. Also converts values to their respective internal types. + * Creates a ListUserListsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsResponse * @static * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.ErrorCount} ErrorCount + * @returns {google.ads.datamanager.v1.ListUserListsResponse} ListUserListsResponse */ - ErrorCount.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.ErrorCount) + ListUserListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.ListUserListsResponse) 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; + var message = new $root.google.ads.datamanager.v1.ListUserListsResponse(); + if (object.userLists) { + if (!Array.isArray(object.userLists)) + throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: array expected"); + message.userLists = []; + for (var i = 0; i < object.userLists.length; ++i) { + if (typeof object.userLists[i] !== "object") + throw TypeError(".google.ads.datamanager.v1.ListUserListsResponse.userLists: object expected"); + message.userLists[i] = $root.google.ads.datamanager.v1.UserList.fromObject(object.userLists[i]); } - 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_AWS_AUTH_FAILED": - case 27: - message.reason = 27; - 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; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an ErrorCount message. Also converts values to other types if specified. + * Creates a plain object from a ListUserListsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsResponse * @static - * @param {google.ads.datamanager.v1.ErrorCount} message ErrorCount + * @param {google.ads.datamanager.v1.ListUserListsResponse} message ListUserListsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorCount.toObject = function toObject(message, options) { + ListUserListsResponse.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; + if (options.arrays || options.defaults) + object.userLists = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userLists && message.userLists.length) { + object.userLists = []; + for (var j = 0; j < message.userLists.length; ++j) + object.userLists[j] = $root.google.ads.datamanager.v1.UserList.toObject(message.userLists[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ErrorCount to JSON. + * Converts this ListUserListsResponse to JSON. * @function toJSON - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsResponse * @instance * @returns {Object.} JSON object */ - ErrorCount.prototype.toJSON = function toJSON() { + ListUserListsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ErrorCount + * Gets the default type url for ListUserListsResponse * @function getTypeUrl - * @memberof google.ads.datamanager.v1.ErrorCount + * @memberof google.ads.datamanager.v1.ListUserListsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListUserListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.datamanager.v1.ErrorCount"; + return typeUrlPrefix + "/google.ads.datamanager.v1.ListUserListsResponse"; }; - return ErrorCount; + return ListUserListsResponse; })(); - v1.WarningInfo = (function() { + v1.CreateUserListRequest = (function() { /** - * Properties of a WarningInfo. + * Properties of a CreateUserListRequest. * @memberof google.ads.datamanager.v1 - * @interface IWarningInfo - * @property {Array.|null} [warningCounts] WarningInfo warningCounts + * @interface ICreateUserListRequest + * @property {string|null} [parent] CreateUserListRequest parent + * @property {google.ads.datamanager.v1.IUserList|null} [userList] CreateUserListRequest userList + * @property {boolean|null} [validateOnly] CreateUserListRequest validateOnly */ /** - * Constructs a new WarningInfo. + * Constructs a new CreateUserListRequest. * @memberof google.ads.datamanager.v1 - * @classdesc Represents a WarningInfo. - * @implements IWarningInfo + * @classdesc Represents a CreateUserListRequest. + * @implements ICreateUserListRequest * @constructor - * @param {google.ads.datamanager.v1.IWarningInfo=} [properties] Properties to set + * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set */ - function WarningInfo(properties) { - this.warningCounts = []; + function CreateUserListRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13182,80 +29492,105 @@ } /** - * WarningInfo warningCounts. - * @member {Array.} warningCounts - * @memberof google.ads.datamanager.v1.WarningInfo + * CreateUserListRequest parent. + * @member {string} parent + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @instance */ - WarningInfo.prototype.warningCounts = $util.emptyArray; + CreateUserListRequest.prototype.parent = ""; /** - * Creates a new WarningInfo instance using the specified properties. + * CreateUserListRequest userList. + * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + */ + CreateUserListRequest.prototype.userList = null; + + /** + * CreateUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.CreateUserListRequest + * @instance + */ + CreateUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateUserListRequest instance using the specified properties. * @function create - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningInfo=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo instance + * @param {google.ads.datamanager.v1.ICreateUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest instance */ - WarningInfo.create = function create(properties) { - return new WarningInfo(properties); + CreateUserListRequest.create = function create(properties) { + return new CreateUserListRequest(properties); }; /** - * Encodes the specified WarningInfo message. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * Encodes the specified CreateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. * @function encode - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningInfo} message WarningInfo message or plain object to encode + * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WarningInfo.encode = function encode(message, writer) { + CreateUserListRequest.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(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.userList != null && Object.hasOwnProperty.call(message, "userList")) + $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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); return writer; }; /** - * Encodes the specified WarningInfo message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningInfo.verify|verify} messages. + * Encodes the specified CreateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.CreateUserListRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningInfo} message WarningInfo message or plain object to encode + * @param {google.ads.datamanager.v1.ICreateUserListRequest} message CreateUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WarningInfo.encodeDelimited = function encodeDelimited(message, writer) { + CreateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WarningInfo message from the specified reader or buffer. + * Decodes a CreateUserListRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @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 + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest * @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) { + CreateUserListRequest.decode = function decode(reader, 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.CreateUserListRequest(); 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())); + message.parent = reader.string(); + break; + } + case 2: { + message.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); break; } default: @@ -13267,140 +29602,146 @@ }; /** - * Decodes a WarningInfo message from the specified reader or buffer, length delimited. + * Decodes a CreateUserListRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest * @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) { + CreateUserListRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WarningInfo message. + * Verifies a CreateUserListRequest message. * @function verify - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @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) { + CreateUserListRequest.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; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.userList != null && message.hasOwnProperty("userList")) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); + if (error) + return "userList." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a WarningInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CreateUserListRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.WarningInfo} WarningInfo + * @returns {google.ads.datamanager.v1.CreateUserListRequest} CreateUserListRequest */ - WarningInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.WarningInfo) + CreateUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.CreateUserListRequest) 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]); - } + var message = new $root.google.ads.datamanager.v1.CreateUserListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userList != null) { + if (typeof object.userList !== "object") + throw TypeError(".google.ads.datamanager.v1.CreateUserListRequest.userList: object expected"); + message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a WarningInfo message. Also converts values to other types if specified. + * Creates a plain object from a CreateUserListRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static - * @param {google.ads.datamanager.v1.WarningInfo} message WarningInfo + * @param {google.ads.datamanager.v1.CreateUserListRequest} message CreateUserListRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WarningInfo.toObject = function toObject(message, options) { + CreateUserListRequest.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); + if (options.defaults) { + object.parent = ""; + object.userList = null; + object.validateOnly = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userList != null && message.hasOwnProperty("userList")) + object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this WarningInfo to JSON. + * Converts this CreateUserListRequest to JSON. * @function toJSON - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @instance * @returns {Object.} JSON object */ - WarningInfo.prototype.toJSON = function toJSON() { + CreateUserListRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WarningInfo + * Gets the default type url for CreateUserListRequest * @function getTypeUrl - * @memberof google.ads.datamanager.v1.WarningInfo + * @memberof google.ads.datamanager.v1.CreateUserListRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WarningInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.datamanager.v1.WarningInfo"; + return typeUrlPrefix + "/google.ads.datamanager.v1.CreateUserListRequest"; }; - return WarningInfo; + return CreateUserListRequest; })(); - v1.WarningCount = (function() { + v1.UpdateUserListRequest = (function() { /** - * Properties of a WarningCount. + * Properties of an UpdateUserListRequest. * @memberof google.ads.datamanager.v1 - * @interface IWarningCount - * @property {number|Long|null} [recordCount] WarningCount recordCount - * @property {google.ads.datamanager.v1.ProcessingWarningReason|null} [reason] WarningCount reason + * @interface IUpdateUserListRequest + * @property {google.ads.datamanager.v1.IUserList|null} [userList] UpdateUserListRequest userList + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUserListRequest updateMask + * @property {boolean|null} [validateOnly] UpdateUserListRequest validateOnly */ /** - * Constructs a new WarningCount. + * Constructs a new UpdateUserListRequest. * @memberof google.ads.datamanager.v1 - * @classdesc Represents a WarningCount. - * @implements IWarningCount + * @classdesc Represents an UpdateUserListRequest. + * @implements IUpdateUserListRequest * @constructor - * @param {google.ads.datamanager.v1.IWarningCount=} [properties] Properties to set + * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set */ - function WarningCount(properties) { + function UpdateUserListRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13408,91 +29749,105 @@ } /** - * WarningCount recordCount. - * @member {number|Long} recordCount - * @memberof google.ads.datamanager.v1.WarningCount + * UpdateUserListRequest userList. + * @member {google.ads.datamanager.v1.IUserList|null|undefined} userList + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @instance */ - WarningCount.prototype.recordCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UpdateUserListRequest.prototype.userList = null; /** - * WarningCount reason. - * @member {google.ads.datamanager.v1.ProcessingWarningReason} reason - * @memberof google.ads.datamanager.v1.WarningCount + * UpdateUserListRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @instance */ - WarningCount.prototype.reason = 0; + UpdateUserListRequest.prototype.updateMask = null; /** - * Creates a new WarningCount instance using the specified properties. + * UpdateUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.UpdateUserListRequest + * @instance + */ + UpdateUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateUserListRequest instance using the specified properties. * @function create - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningCount=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.WarningCount} WarningCount instance + * @param {google.ads.datamanager.v1.IUpdateUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest instance */ - WarningCount.create = function create(properties) { - return new WarningCount(properties); + UpdateUserListRequest.create = function create(properties) { + return new UpdateUserListRequest(properties); }; /** - * Encodes the specified WarningCount message. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * Encodes the specified UpdateUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. * @function encode - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningCount} message WarningCount message or plain object to encode + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WarningCount.encode = function encode(message, writer) { + UpdateUserListRequest.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); + if (message.userList != null && Object.hasOwnProperty.call(message, "userList")) + $root.google.ads.datamanager.v1.UserList.encode(message.userList, 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified WarningCount message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.WarningCount.verify|verify} messages. + * Encodes the specified UpdateUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.UpdateUserListRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static - * @param {google.ads.datamanager.v1.IWarningCount} message WarningCount message or plain object to encode + * @param {google.ads.datamanager.v1.IUpdateUserListRequest} message UpdateUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WarningCount.encodeDelimited = function encodeDelimited(message, writer) { + UpdateUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WarningCount message from the specified reader or buffer. + * Decodes an UpdateUserListRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @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 + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest * @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) { + UpdateUserListRequest.decode = function decode(reader, 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.UpdateUserListRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.recordCount = reader.int64(); + message.userList = $root.google.ads.datamanager.v1.UserList.decode(reader, reader.uint32()); break; } case 2: { - message.reason = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); break; } default: @@ -13504,300 +29859,150 @@ }; /** - * Decodes a WarningCount message from the specified reader or buffer, length delimited. + * Decodes an UpdateUserListRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.WarningCount} WarningCount + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest * @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) { + UpdateUserListRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WarningCount message. + * Verifies an UpdateUserListRequest message. * @function verify - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @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) { + UpdateUserListRequest.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: - break; - } + if (message.userList != null && message.hasOwnProperty("userList")) { + var error = $root.google.ads.datamanager.v1.UserList.verify(message.userList); + if (error) + return "userList." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a WarningCount message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateUserListRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.WarningCount} WarningCount + * @returns {google.ads.datamanager.v1.UpdateUserListRequest} UpdateUserListRequest */ - WarningCount.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.WarningCount) + UpdateUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.UpdateUserListRequest) 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; - case "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": - case 9: - message.reason = 9; - break; + var message = new $root.google.ads.datamanager.v1.UpdateUserListRequest(); + if (object.userList != null) { + if (typeof object.userList !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.userList: object expected"); + message.userList = $root.google.ads.datamanager.v1.UserList.fromObject(object.userList); } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.ads.datamanager.v1.UpdateUserListRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a WarningCount message. Also converts values to other types if specified. + * Creates a plain object from an UpdateUserListRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static - * @param {google.ads.datamanager.v1.WarningCount} message WarningCount + * @param {google.ads.datamanager.v1.UpdateUserListRequest} message UpdateUserListRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WarningCount.toObject = function toObject(message, options) { + UpdateUserListRequest.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; + object.userList = null; + object.updateMask = null; + object.validateOnly = false; } - 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; + if (message.userList != null && message.hasOwnProperty("userList")) + object.userList = $root.google.ads.datamanager.v1.UserList.toObject(message.userList, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this WarningCount to JSON. + * Converts this UpdateUserListRequest to JSON. * @function toJSON - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @instance * @returns {Object.} JSON object */ - WarningCount.prototype.toJSON = function toJSON() { + UpdateUserListRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WarningCount + * Gets the default type url for UpdateUserListRequest * @function getTypeUrl - * @memberof google.ads.datamanager.v1.WarningCount + * @memberof google.ads.datamanager.v1.UpdateUserListRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WarningCount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.datamanager.v1.WarningCount"; + return typeUrlPrefix + "/google.ads.datamanager.v1.UpdateUserListRequest"; }; - 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_AWS_AUTH_FAILED=27 PROCESSING_ERROR_REASON_AWS_AUTH_FAILED 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[27] = "PROCESSING_ERROR_REASON_AWS_AUTH_FAILED"] = 27; - 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 - * @property {number} PROCESSING_WARNING_REASON_AWS_AUTH_FAILED=9 PROCESSING_WARNING_REASON_AWS_AUTH_FAILED 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; - values[valuesById[9] = "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED"] = 9; - return values; + return UpdateUserListRequest; })(); - v1.TermsOfService = (function() { + v1.DeleteUserListRequest = (function() { /** - * Properties of a TermsOfService. + * Properties of a DeleteUserListRequest. * @memberof google.ads.datamanager.v1 - * @interface ITermsOfService - * @property {google.ads.datamanager.v1.TermsOfServiceStatus|null} [customerMatchTermsOfServiceStatus] TermsOfService customerMatchTermsOfServiceStatus + * @interface IDeleteUserListRequest + * @property {string|null} [name] DeleteUserListRequest name + * @property {boolean|null} [validateOnly] DeleteUserListRequest validateOnly */ /** - * Constructs a new TermsOfService. + * Constructs a new DeleteUserListRequest. * @memberof google.ads.datamanager.v1 - * @classdesc Represents a TermsOfService. - * @implements ITermsOfService + * @classdesc Represents a DeleteUserListRequest. + * @implements IDeleteUserListRequest * @constructor - * @param {google.ads.datamanager.v1.ITermsOfService=} [properties] Properties to set + * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set */ - function TermsOfService(properties) { + function DeleteUserListRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13805,77 +30010,91 @@ } /** - * TermsOfService customerMatchTermsOfServiceStatus. - * @member {google.ads.datamanager.v1.TermsOfServiceStatus} customerMatchTermsOfServiceStatus - * @memberof google.ads.datamanager.v1.TermsOfService + * DeleteUserListRequest name. + * @member {string} name + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @instance */ - TermsOfService.prototype.customerMatchTermsOfServiceStatus = 0; + DeleteUserListRequest.prototype.name = ""; /** - * Creates a new TermsOfService instance using the specified properties. + * DeleteUserListRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.ads.datamanager.v1.DeleteUserListRequest + * @instance + */ + DeleteUserListRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteUserListRequest instance using the specified properties. * @function create - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static - * @param {google.ads.datamanager.v1.ITermsOfService=} [properties] Properties to set - * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService instance + * @param {google.ads.datamanager.v1.IDeleteUserListRequest=} [properties] Properties to set + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest instance */ - TermsOfService.create = function create(properties) { - return new TermsOfService(properties); + DeleteUserListRequest.create = function create(properties) { + return new DeleteUserListRequest(properties); }; /** - * Encodes the specified TermsOfService message. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * Encodes the specified DeleteUserListRequest message. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. * @function encode - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static - * @param {google.ads.datamanager.v1.ITermsOfService} message TermsOfService message or plain object to encode + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TermsOfService.encode = function encode(message, writer) { + DeleteUserListRequest.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); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); return writer; }; /** - * Encodes the specified TermsOfService message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.TermsOfService.verify|verify} messages. + * Encodes the specified DeleteUserListRequest message, length delimited. Does not implicitly {@link google.ads.datamanager.v1.DeleteUserListRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static - * @param {google.ads.datamanager.v1.ITermsOfService} message TermsOfService message or plain object to encode + * @param {google.ads.datamanager.v1.IDeleteUserListRequest} message DeleteUserListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TermsOfService.encodeDelimited = function encodeDelimited(message, writer) { + DeleteUserListRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TermsOfService message from the specified reader or buffer. + * Decodes a DeleteUserListRequest message from the specified reader or buffer. * @function decode - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @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 + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest * @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) { + DeleteUserListRequest.decode = function decode(reader, 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ads.datamanager.v1.DeleteUserListRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.customerMatchTermsOfServiceStatus = reader.int32(); + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); break; } default: @@ -13887,142 +30106,111 @@ }; /** - * Decodes a TermsOfService message from the specified reader or buffer, length delimited. + * Decodes a DeleteUserListRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest * @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) { + DeleteUserListRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TermsOfService message. + * Verifies a DeleteUserListRequest message. * @function verify - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @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) { + DeleteUserListRequest.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; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a TermsOfService message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteUserListRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static * @param {Object.} object Plain object - * @returns {google.ads.datamanager.v1.TermsOfService} TermsOfService + * @returns {google.ads.datamanager.v1.DeleteUserListRequest} DeleteUserListRequest */ - TermsOfService.fromObject = function fromObject(object) { - if (object instanceof $root.google.ads.datamanager.v1.TermsOfService) + DeleteUserListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ads.datamanager.v1.DeleteUserListRequest) 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; - } + var message = new $root.google.ads.datamanager.v1.DeleteUserListRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a TermsOfService message. Also converts values to other types if specified. + * Creates a plain object from a DeleteUserListRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static - * @param {google.ads.datamanager.v1.TermsOfService} message TermsOfService + * @param {google.ads.datamanager.v1.DeleteUserListRequest} message DeleteUserListRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TermsOfService.toObject = function toObject(message, options) { + DeleteUserListRequest.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; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this TermsOfService to JSON. + * Converts this DeleteUserListRequest to JSON. * @function toJSON - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @instance * @returns {Object.} JSON object */ - TermsOfService.prototype.toJSON = function toJSON() { + DeleteUserListRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TermsOfService + * Gets the default type url for DeleteUserListRequest * @function getTypeUrl - * @memberof google.ads.datamanager.v1.TermsOfService + * @memberof google.ads.datamanager.v1.DeleteUserListRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TermsOfService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteUserListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.ads.datamanager.v1.TermsOfService"; + return typeUrlPrefix + "/google.ads.datamanager.v1.DeleteUserListRequest"; }; - 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 DeleteUserListRequest; })(); return v1; @@ -14071,6 +30259,694 @@ 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; + })(); + api.Http = (function() { /** @@ -24053,6 +40929,7 @@ * @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 */ /** @@ -24065,6 +40942,7 @@ */ 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) @@ -24239,6 +41117,14 @@ */ 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 @@ -24306,6 +41192,9 @@ 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; }; @@ -24428,6 +41317,12 @@ 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; @@ -24540,6 +41435,15 @@ 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; }; @@ -24626,6 +41530,16 @@ 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; }; @@ -24642,8 +41556,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { object.javaPackage = ""; object.javaOuterClassname = ""; @@ -24711,6 +41627,11 @@ 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; }; @@ -24772,6 +41693,7 @@ * @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 */ /** @@ -24846,6 +41768,14 @@ */ 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 @@ -24885,6 +41815,8 @@ 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; }; @@ -24951,6 +41883,10 @@ 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; @@ -25015,6 +41951,11 @@ 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; }; @@ -25055,6 +41996,11 @@ 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; }; @@ -25080,6 +42026,7 @@ 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; @@ -25098,6 +42045,8 @@ 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; }; @@ -25150,6 +42099,7 @@ * @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 */ /** @@ -25283,6 +42233,14 @@ */ 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 @@ -25339,6 +42297,8 @@ 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; }; @@ -25449,6 +42409,10 @@ 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; @@ -25591,6 +42555,11 @@ 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; }; @@ -25805,6 +42774,11 @@ 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; }; @@ -25838,6 +42812,7 @@ 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; @@ -25879,6 +42854,8 @@ 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; }; @@ -31487,6 +48464,404 @@ return Duration; })(); + 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.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + return protobuf; })(); diff --git a/packages/google-ads-datamanager/protos/protos.json b/packages/google-ads-datamanager/protos/protos.json index ffb98553750..2fefbf18e39 100644 --- a/packages/google-ads-datamanager/protos/protos.json +++ b/packages/google-ads-datamanager/protos/protos.json @@ -11,19 +11,35 @@ "csharp_namespace": "Google.Ads.DataManager.V1", "go_package": "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb", "java_multiple_files": true, - "java_outer_classname": "TermsOfServiceProto", + "java_outer_classname": "UserListServiceProto", "java_package": "com.google.ads.datamanager.v1", "php_namespace": "Google\\Ads\\DataManager\\V1", - "ruby_package": "Google::Ads::DataManager::V1" + "ruby_package": "Google::Ads::DataManager::V1", + "(google.api.resource_definition).type": "datamanager.googleapis.com/Account", + "(google.api.resource_definition).pattern": "accountTypes/{account_type}/accounts/{account}" }, "nested": { + "AgeRange": { + "values": { + "AGE_RANGE_UNSPECIFIED": 0, + "AGE_RANGE_UNKNOWN": 1, + "AGE_RANGE_18_24": 2, + "AGE_RANGE_25_34": 3, + "AGE_RANGE_35_44": 4, + "AGE_RANGE_45_54": 5, + "AGE_RANGE_55_64": 6, + "AGE_RANGE_65_UP": 7 + } + }, "AudienceMember": { "oneofs": { "data": { "oneof": [ "userData", "pairData", - "mobileData" + "mobileData", + "userIdData", + "ppidData" ] } }, @@ -48,6 +64,14 @@ "type": "MobileData", "id": 5 }, + "userIdData": { + "type": "UserIdData", + "id": 6 + }, + "ppidData": { + "type": "PpidData", + "id": 7 + }, "consent": { "type": "Consent", "id": 3, @@ -81,6 +105,29 @@ } } }, + "UserIdData": { + "fields": { + "userId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PpidData": { + "fields": { + "ppids": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "Consent": { "fields": { "adUserData": { @@ -344,7 +391,8 @@ "DISPLAY_VIDEO_PARTNER": 2, "DISPLAY_VIDEO_ADVERTISER": 3, "DATA_PARTNER": 4, - "GOOGLE_ANALYTICS_PROPERTY": 5 + "GOOGLE_ANALYTICS_PROPERTY": 5, + "GOOGLE_AD_MANAGER_AUDIENCE_LINK": 6 } } } @@ -532,10 +580,64 @@ "INVALID_REQUEST_ID": 48, "MULTIPLE_DESTINATIONS_FOR_GOOGLE_ANALYTICS_EVENT": 49, "FIELD_VALUE_TOO_LONG": 50, - "TOO_MANY_ELEMENTS": 51 + "TOO_MANY_ELEMENTS": 51, + "ALREADY_EXISTS": 52, + "IMMUTABLE_FIELD_FOR_UPDATE": 53, + "INVALID_RESOURCE_NAME": 54, + "INVALID_FILTER": 55, + "INVALID_UPDATE_MASK": 56, + "INVALID_PAGE_TOKEN": 57, + "CANNOT_UPDATE_DISABLED_LICENSE": 58, + "CANNOT_CREATE_LICENSE_FOR_SENSITIVE_USERLIST": 59, + "INSUFFICIENT_COST": 60, + "CANNOT_DISABLE_LICENSE": 61, + "INVALID_CLIENT_ACCOUNT_ID": 62, + "PRICING_ONLY_ZERO_COST_ALLOWED": 63, + "PRICE_TOO_HIGH": 64, + "CUSTOMER_NOT_ALLOWED_TO_CREATE_LICENSE": 65, + "INVALID_PRICING_END_DATE": 66, + "CANNOT_LICENSE_LOGICAL_LIST_WITH_LICENSED_OR_SHARED_SEGMENT": 67, + "MISMATCHED_ACCOUNT_TYPE": 68, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_LICENSE_TYPE": 69, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_CLIENT_CUSTOMER": 70, + "INVALID_MEDIA_SHARE_COST": 71, + "INVALID_COST_TYPE": 72, + "MEDIA_SHARE_COST_NOT_ALLOWED_FOR_NON_COMMERCE_USER_LIST": 73, + "MAX_COST_NOT_ALLOWED": 74, + "COMMERCE_AUDIENCE_CAN_ONLY_BE_DIRECTLY_LICENSED": 75, + "INVALID_DESCRIPTION": 76, + "INVALID_DISPLAY_NAME": 77, + "DISPLAY_NAME_ALREADY_USED": 78, + "OWNERSHIP_REQUIRED_FOR_UPDATE": 79, + "USER_LIST_MUTATION_NOT_SUPPORTED": 80, + "SENSITIVE_USER_LIST_IMMUTABLE": 81, + "BILLABLE_RECORD_COUNT_IMMUTABLE": 82, + "USER_LIST_NAME_RESERVED": 83, + "ADVERTISER_NOT_ALLOWLISTED_FOR_UPLOADED_DATA": 84, + "UNSUPPORTED_PARTNER_AUDIENCE_SOURCE": 85, + "COMMERCE_PARTNER_NOT_ALLOWED": 86, + "UNSUPPORTED_PARTNER_AUDIENCE_INFO": 87, + "PARTNER_MATCH_FOR_MANAGER_ACCOUNT_DISALLOWED": 88, + "DATA_PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 89, + "ADVERTISER_TOS_NOT_ACCEPTED": 90, + "ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA": 91, + "USER_LIST_TYPE_NOT_SUPPORTED_FOR_ACCOUNT": 92, + "INVALID_COMMERCE_PARTNER": 93, + "CUSTOMER_NOT_ALLOWLISTED_FOR_COMMERCE_AUDIENCE": 94, + "UNSUPPORTED_USER_LIST_UPLOAD_KEY_TYPES": 95, + "UNSUPPORTED_INGESTED_USER_LIST_INFO_CONFIG": 96, + "UNSUPPORTED_ACCOUNT_TYPES_FOR_USER_LIST_TYPE": 97, + "UNSUPPORTED_ACCOUNT_TYPE_FOR_PARTNER_LINK": 98 } }, "Event": { + "oneofs": { + "_conversionValue": { + "oneof": [ + "conversionValue" + ] + } + }, "fields": { "destinationReferences": { "rule": "repeated", @@ -598,7 +700,8 @@ "type": "double", "id": 9, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, "eventSource": { @@ -847,6 +950,14 @@ "HIGH": 3 } }, + "Gender": { + "values": { + "GENDER_UNSPECIFIED": 0, + "GENDER_UNKNOWN": 1, + "GENDER_MALE": 2, + "GENDER_FEMALE": 3 + } + }, "IngestionService": { "options": { "(google.api.default_host)": "datamanager.googleapis.com", @@ -1168,7 +1279,9 @@ "oneof": [ "userDataIngestionStatus", "mobileDataIngestionStatus", - "pairDataIngestionStatus" + "pairDataIngestionStatus", + "userIdDataIngestionStatus", + "ppidDataIngestionStatus" ] } }, @@ -1184,6 +1297,14 @@ "pairDataIngestionStatus": { "type": "IngestPairDataStatus", "id": 3 + }, + "userIdDataIngestionStatus": { + "type": "IngestUserIdDataStatus", + "id": 4 + }, + "ppidDataIngestionStatus": { + "type": "IngestPpidDataStatus", + "id": 5 } } }, @@ -1193,7 +1314,9 @@ "oneof": [ "userDataRemovalStatus", "mobileDataRemovalStatus", - "pairDataRemovalStatus" + "pairDataRemovalStatus", + "userIdDataRemovalStatus", + "ppidDataRemovalStatus" ] } }, @@ -1209,6 +1332,14 @@ "pairDataRemovalStatus": { "type": "RemovePairDataStatus", "id": 3 + }, + "userIdDataRemovalStatus": { + "type": "RemoveUserIdDataStatus", + "id": 4 + }, + "ppidDataRemovalStatus": { + "type": "RemovePpidDataStatus", + "id": 5 } } }, @@ -1266,157 +1397,2200 @@ "type": "int64", "id": 1 }, - "mobileIdCount": { - "type": "int64", - "id": 2 + "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 + } + } + }, + "IngestUserIdDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemoveUserIdDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "userIdCount": { + "type": "int64", + "id": 2 + } + } + }, + "IngestPpidDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "ppidCount": { + "type": "int64", + "id": 2 + } + } + }, + "RemovePpidDataStatus": { + "fields": { + "recordCount": { + "type": "int64", + "id": 1 + }, + "ppidCount": { + "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_AWS_AUTH_FAILED": 27, + "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, + "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": 9 + } + }, + "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 + } + }, + "MarketingDataInsightsService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "RetrieveInsights": { + "requestType": "RetrieveInsightsRequest", + "responseType": "RetrieveInsightsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/insights:retrieve", + "body": "*" + } + } + ] + } + } + }, + "RetrieveInsightsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "baseline": { + "type": "Baseline", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "userListId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Baseline": { + "oneofs": { + "baseline": { + "oneof": [ + "baselineLocation", + "locationAutoDetectionEnabled" + ] + } + }, + "fields": { + "baselineLocation": { + "type": "Location", + "id": 1 + }, + "locationAutoDetectionEnabled": { + "type": "bool", + "id": 2 + } + }, + "nested": { + "Location": { + "fields": { + "regionCodes": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "RetrieveInsightsResponse": { + "fields": { + "marketingDataInsights": { + "rule": "repeated", + "type": "MarketingDataInsight", + "id": 1 + } + }, + "nested": { + "MarketingDataInsight": { + "fields": { + "dimension": { + "type": "AudienceInsightsDimension", + "id": 1 + }, + "attributes": { + "rule": "repeated", + "type": "MarketingDataInsightsAttribute", + "id": 2 + } + }, + "nested": { + "AudienceInsightsDimension": { + "values": { + "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED": 0, + "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN": 1, + "AFFINITY_USER_INTEREST": 2, + "IN_MARKET_USER_INTEREST": 3, + "AGE_RANGE": 4, + "GENDER": 5 + } + }, + "MarketingDataInsightsAttribute": { + "oneofs": { + "_userInterestId": { + "oneof": [ + "userInterestId" + ] + }, + "_lift": { + "oneof": [ + "lift" + ] + }, + "_ageRange": { + "oneof": [ + "ageRange" + ] + }, + "_gender": { + "oneof": [ + "gender" + ] + } + }, + "fields": { + "userInterestId": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "lift": { + "type": "float", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "ageRange": { + "type": "AgeRange", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "gender": { + "type": "Gender", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + } + } + } + } + }, + "PartnerLinkService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreatePartnerLink": { + "requestType": "CreatePartnerLinkRequest", + "responseType": "PartnerLink", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", + "(google.api.http).body": "partner_link", + "(google.api.method_signature)": "parent,partner_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks", + "body": "partner_link" + } + }, + { + "(google.api.method_signature)": "parent,partner_link" + } + ] + }, + "DeletePartnerLink": { + "requestType": "DeletePartnerLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SearchPartnerLinks": { + "requestType": "SearchPartnerLinksRequest", + "responseType": "SearchPartnerLinksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/partnerLinks:search" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreatePartnerLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" + } + }, + "partnerLink": { + "type": "PartnerLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePartnerLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/PartnerLink" + } + } + } + }, + "SearchPartnerLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/PartnerLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchPartnerLinksResponse": { + "fields": { + "partnerLinks": { + "rule": "repeated", + "type": "PartnerLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PartnerLink": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/PartnerLink", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}", + "(google.api.resource).plural": "partnerLinks", + "(google.api.resource).singular": "partnerLink" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "partnerLinkId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "owningAccount": { + "type": "ProductAccount", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "partnerAccount": { + "type": "ProductAccount", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UserList": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserList", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userLists/{user_list}", + "(google.api.resource).plural": "userLists", + "(google.api.resource).singular": "userList" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_membershipStatus": { + "oneof": [ + "membershipStatus" + ] + }, + "_integrationCode": { + "oneof": [ + "integrationCode" + ] + }, + "_closingReason": { + "oneof": [ + "closingReason" + ] + }, + "_accountAccessStatus": { + "oneof": [ + "accountAccessStatus" + ] + }, + "userListInfo": { + "oneof": [ + "ingestedUserListInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "id": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "readOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "membershipStatus": { + "type": "MembershipStatus", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "integrationCode": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "membershipDuration": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "closingReason": { + "type": "ClosingReason", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessReason": { + "type": "AccessReason", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "accountAccessStatus": { + "type": "AccessStatus", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sizeInfo": { + "type": "SizeInfo", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetNetworkInfo": { + "type": "TargetNetworkInfo", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ingestedUserListInfo": { + "type": "IngestedUserListInfo", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MembershipStatus": { + "values": { + "MEMBERSHIP_STATUS_UNSPECIFIED": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "ClosingReason": { + "values": { + "CLOSING_REASON_UNSPECIFIED": 0, + "UNUSED": 1 + } + }, + "AccessReason": { + "values": { + "ACCESS_REASON_UNSPECIFIED": 0, + "OWNED": 1, + "SHARED": 2, + "LICENSED": 3, + "SUBSCRIBED": 4, + "AFFILIATED": 5 + } + }, + "AccessStatus": { + "values": { + "ACCESS_STATUS_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, + "SizeInfo": { + "fields": { + "displayNetworkMembersCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "searchNetworkMembersCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "TargetNetworkInfo": { + "oneofs": { + "_eligibleForSearch": { + "oneof": [ + "eligibleForSearch" + ] + } + }, + "fields": { + "eligibleForDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eligibleForSearch": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "IngestedUserListInfo": { + "fields": { + "uploadKeyTypes": { + "rule": "repeated", + "type": "UploadKeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "contactIdInfo": { + "type": "ContactIdInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mobileIdInfo": { + "type": "MobileIdInfo", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userIdInfo": { + "type": "UserIdInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pairIdInfo": { + "type": "PairIdInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pseudonymousIdInfo": { + "type": "PseudonymousIdInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partnerAudienceInfo": { + "type": "PartnerAudienceInfo", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "UploadKeyType": { + "values": { + "UPLOAD_KEY_TYPE_UNSPECIFIED": 0, + "CONTACT_ID": 1, + "MOBILE_ID": 2, + "USER_ID": 3, + "PAIR_ID": 4, + "PSEUDONYMOUS_ID": 5 + } + } + } + }, + "ContactIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "matchRatePercentage": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "MobileIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + }, + "_keySpace": { + "oneof": [ + "keySpace" + ] + }, + "_appId": { + "oneof": [ + "appId" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "keySpace": { + "type": "KeySpace", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "appId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + }, + "nested": { + "KeySpace": { + "values": { + "KEY_SPACE_UNSPECIFIED": 0, + "IOS": 1, + "ANDROID": 2 + } + } + } + }, + "UserIdInfo": { + "oneofs": { + "_dataSourceType": { + "oneof": [ + "dataSourceType" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + } + }, + "PairIdInfo": { + "oneofs": { + "_publisherId": { + "oneof": [ + "publisherId" + ] + }, + "_publisherName": { + "oneof": [ + "publisherName" + ] + }, + "_cleanRoomIdentifier": { + "oneof": [ + "cleanRoomIdentifier" + ] + } + }, + "fields": { + "publisherId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "publisherName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "matchRatePercentage": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advertiserIdentifierCount": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cleanRoomIdentifier": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + } + }, + "PartnerAudienceInfo": { + "oneofs": { + "_partnerAudienceSource": { + "oneof": [ + "partnerAudienceSource" + ] + }, + "_commercePartner": { + "oneof": [ + "commercePartner" + ] + } + }, + "fields": { + "partnerAudienceSource": { + "type": "PartnerAudienceSource", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "commercePartner": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "PartnerAudienceSource": { + "values": { + "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED": 0, + "COMMERCE_AUDIENCE": 1, + "LINEAR_TV_AUDIENCE": 2, + "AGENCY_PROVIDER_AUDIENCE": 3 + } + } + } + }, + "PseudonymousIdInfo": { + "oneofs": { + "_syncStatus": { + "oneof": [ + "syncStatus" + ] + }, + "_billableRecordCount": { + "oneof": [ + "billableRecordCount" + ] + } + }, + "fields": { + "syncStatus": { + "type": "SyncStatus", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "billableRecordCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + } + }, + "nested": { + "SyncStatus": { + "values": { + "SYNC_STATUS_UNSPECIFIED": 0, + "CREATED": 1, + "READY_FOR_USE": 2, + "FAILED": 3 + } + } + } + }, + "DataSourceType": { + "values": { + "DATA_SOURCE_TYPE_UNSPECIFIED": 0, + "DATA_SOURCE_TYPE_FIRST_PARTY": 1, + "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU": 2, + "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE": 3, + "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA": 4 + } + }, + "UserListDirectLicense": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListDirectLicense", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}", + "(google.api.resource).plural": "userListDirectLicenses", + "(google.api.resource).singular": "userListDirectLicense" + }, + "oneofs": { + "_userListId": { + "oneof": [ + "userListId" + ] + }, + "_clientAccountType": { + "oneof": [ + "clientAccountType" + ] + }, + "_clientAccountId": { + "oneof": [ + "clientAccountId" + ] + }, + "_status": { + "oneof": [ + "status" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountType": { + "type": "UserListLicenseClientAccountType", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "clientAccountId": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "clientAccountDisplayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListLicenseClientAccountType": { + "values": { + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN": 0, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS": 1, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER": 2, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER": 3, + "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK": 4 + } + }, + "UserListLicenseMetrics": { + "fields": { + "clickCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "impressionCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revenueUsdMicros": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startDate": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endDate": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListLicensePricing": { + "oneofs": { + "_costMicros": { + "oneof": [ + "costMicros" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + }, + "_costType": { + "oneof": [ + "costType" + ] + }, + "_maxCostMicros": { + "oneof": [ + "maxCostMicros" + ] + } + }, + "fields": { + "pricingId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "costMicros": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pricingActive": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "buyerApprovalState": { + "type": "UserListPricingBuyerApprovalState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "costType": { + "type": "UserListPricingCostType", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "maxCostMicros": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "UserListPricingBuyerApprovalState": { + "values": { + "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "APPROVED": 2, + "REJECTED": 3 + } + }, + "UserListPricingCostType": { + "values": { + "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED": 0, + "CPC": 1, + "CPM": 2, + "MEDIA_SHARE": 3 + } + } + } + }, + "UserListLicenseStatus": { + "values": { + "USER_LIST_LICENSE_STATUS_UNSPECIFIED": 0, + "USER_LIST_LICENSE_STATUS_ENABLED": 1, + "USER_LIST_LICENSE_STATUS_DISABLED": 2 + } + }, + "UserListDirectLicenseService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreateUserListDirectLicense": { + "requestType": "CreateUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "(google.api.http).body": "user_list_direct_license", + "(google.api.method_signature)": "parent,user_list_direct_license" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "body": "user_list_direct_license" + } + }, + { + "(google.api.method_signature)": "parent,user_list_direct_license" + } + ] + }, + "GetUserListDirectLicense": { + "requestType": "GetUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userListDirectLicenses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateUserListDirectLicense": { + "requestType": "UpdateUserListDirectLicenseRequest", + "responseType": "UserListDirectLicense", + "options": { + "(google.api.http).patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "(google.api.http).body": "user_list_direct_license", + "(google.api.method_signature)": "user_list_direct_license,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list_direct_license.name=accountTypes/*/accounts/*/userListDirectLicenses/*}", + "body": "user_list_direct_license" + } + }, + { + "(google.api.method_signature)": "user_list_direct_license,update_mask" + } + ] + }, + "ListUserListDirectLicenses": { + "requestType": "ListUserListDirectLicensesRequest", + "responseType": "ListUserListDirectLicensesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateUserListDirectLicenseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" + } + }, + "userListDirectLicense": { + "type": "UserListDirectLicense", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserListDirectLicenseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListDirectLicense" + } + } + } + }, + "UpdateUserListDirectLicenseRequest": { + "fields": { + "userListDirectLicense": { + "type": "UserListDirectLicense", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListDirectLicensesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListDirectLicense" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListDirectLicensesResponse": { + "fields": { + "userListDirectLicenses": { + "rule": "repeated", + "type": "UserListDirectLicense", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserListGlobalLicense": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicense", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}", + "(google.api.resource).plural": "userListGlobalLicenses", + "(google.api.resource).singular": "userListGlobalLicense" + }, + "oneofs": { + "_userListId": { + "oneof": [ + "userListId" + ] + }, + "_licenseType": { + "oneof": [ + "licenseType" + ] + }, + "_status": { + "oneof": [ + "status" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "licenseType": { + "type": "UserListGlobalLicenseType", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "proto3_optional": true + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListGlobalLicenseCustomerInfo": { + "options": { + "(google.api.resource).type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo", + "(google.api.resource).pattern": "accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}", + "(google.api.resource).plural": "userListGlobalLicenseCustomerInfos", + "(google.api.resource).singular": "userListGlobalLicenseCustomerInfo" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "userListId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "userListDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "licenseType": { + "type": "UserListGlobalLicenseType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "UserListLicenseStatus", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pricing": { + "type": "UserListLicensePricing", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountType": { + "type": "UserListLicenseClientAccountType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountId": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientAccountDisplayName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "historicalPricings": { + "rule": "repeated", + "type": "UserListLicensePricing", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "type": "UserListLicenseMetrics", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserListGlobalLicenseType": { + "values": { + "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED": 0, + "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER": 1, + "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE": 2, + "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE": 3 + } + }, + "UserListGlobalLicenseService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "CreateUserListGlobalLicense": { + "requestType": "CreateUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "(google.api.http).body": "user_list_global_license", + "(google.api.method_signature)": "parent,user_list_global_license" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "body": "user_list_global_license" + } + }, + { + "(google.api.method_signature)": "parent,user_list_global_license" + } + ] + }, + "UpdateUserListGlobalLicense": { + "requestType": "UpdateUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "(google.api.http).body": "user_list_global_license", + "(google.api.method_signature)": "user_list_global_license,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list_global_license.name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "body": "user_list_global_license" + } + }, + { + "(google.api.method_signature)": "user_list_global_license,update_mask" + } + ] + }, + "GetUserListGlobalLicense": { + "requestType": "GetUserListGlobalLicenseRequest", + "responseType": "UserListGlobalLicense", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userListGlobalLicenses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserListGlobalLicenses": { + "requestType": "ListUserListGlobalLicensesRequest", + "responseType": "ListUserListGlobalLicensesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userListGlobalLicenses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "requestType": "ListUserListGlobalLicenseCustomerInfosRequest", + "responseType": "ListUserListGlobalLicenseCustomerInfosResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*/userListGlobalLicenses/*}/userListGlobalLicenseCustomerInfos" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateUserListGlobalLicenseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" + } + }, + "userListGlobalLicense": { + "type": "UserListGlobalLicense", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateUserListGlobalLicenseRequest": { + "fields": { + "userListGlobalLicense": { + "type": "UserListGlobalLicense", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetUserListGlobalLicenseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserListGlobalLicense" + } + } + } + }, + "ListUserListGlobalLicensesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicense" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListGlobalLicensesResponse": { + "fields": { + "userListGlobalLicenses": { + "rule": "repeated", + "type": "UserListGlobalLicense", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListUserListGlobalLicenseCustomerInfosRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserListGlobalLicenseCustomerInfo" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserListGlobalLicenseCustomerInfosResponse": { + "fields": { + "userListGlobalLicenseCustomerInfos": { + "rule": "repeated", + "type": "UserListGlobalLicenseCustomerInfo", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserListService": { + "options": { + "(google.api.default_host)": "datamanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/datamanager" + }, + "methods": { + "GetUserList": { + "requestType": "GetUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserLists": { + "requestType": "ListUserListsRequest", + "responseType": "ListUserListsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=accountTypes/*/accounts/*}/userLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateUserList": { + "requestType": "CreateUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "(google.api.http).body": "user_list", + "(google.api.method_signature)": "parent,user_list" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=accountTypes/*/accounts/*}/userLists", + "body": "user_list" + } + }, + { + "(google.api.method_signature)": "parent,user_list" } - } + ] }, - "IngestPairDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 + "UpdateUserList": { + "requestType": "UpdateUserListRequest", + "responseType": "UserList", + "options": { + "(google.api.http).patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.http).body": "user_list", + "(google.api.method_signature)": "user_list,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{user_list.name=accountTypes/*/accounts/*/userLists/*}", + "body": "user_list" + } }, - "pairIdCount": { - "type": "int64", - "id": 2 + { + "(google.api.method_signature)": "user_list,update_mask" } - } + ] }, - "RemovePairDataStatus": { - "fields": { - "recordCount": { - "type": "int64", - "id": 1 + "DeleteUserList": { + "requestType": "DeleteUserListRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=accountTypes/*/accounts/*/userLists/*}" + } }, - "pairIdCount": { - "type": "int64", - "id": 2 + { + "(google.api.method_signature)": "name" } - } + ] } } }, - "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": { + "GetUserListRequest": { "fields": { - "errorCounts": { - "rule": "repeated", - "type": "ErrorCount", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" + } } } }, - "ErrorCount": { + "ListUserListsRequest": { "fields": { - "recordCount": { - "type": "int64", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" + } }, - "reason": { - "type": "ProcessingErrorReason", - "id": 2 + "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" + } } } }, - "WarningInfo": { + "ListUserListsResponse": { "fields": { - "warningCounts": { + "userLists": { "rule": "repeated", - "type": "WarningCount", + "type": "UserList", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "WarningCount": { + "CreateUserListRequest": { "fields": { - "recordCount": { - "type": "int64", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamanager.googleapis.com/UserList" + } }, - "reason": { - "type": "ProcessingWarningReason", - "id": 2 + "userList": { + "type": "UserList", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "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_AWS_AUTH_FAILED": 27, - "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, - "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED": 9 - } - }, - "TermsOfService": { + "UpdateUserListRequest": { "fields": { - "customerMatchTermsOfServiceStatus": { - "type": "TermsOfServiceStatus", + "userList": { + "type": "UserList", "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "TermsOfServiceStatus": { - "values": { - "TERMS_OF_SERVICE_STATUS_UNSPECIFIED": 0, - "ACCEPTED": 1, - "REJECTED": 2 + "DeleteUserListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamanager.googleapis.com/UserList" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } } } @@ -1457,6 +3631,83 @@ "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 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -3184,6 +5435,18 @@ "id": 2 } } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } } } } diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js b/packages/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js rename to packages/google-ads-datamanager/samples/generated/v1/marketing_data_insights_service.retrieve_insights.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js b/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js rename to packages/google-ads-datamanager/samples/generated/v1/partner_link_service.create_partner_link.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js b/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js rename to packages/google-ads-datamanager/samples/generated/v1/partner_link_service.delete_partner_link.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js b/packages/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js rename to packages/google-ads-datamanager/samples/generated/v1/partner_link_service.search_partner_links.js 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 index 18c375ea831..08c06e3ea9f 100644 --- 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 @@ -230,6 +230,834 @@ } } } + }, + { + "regionTag": "datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_async", + "title": "IngestionService retrieveInsights Sample", + "origin": "API_DEFINITION", + "description": " Retrieves marketing data insights for a given user list. This feature is only available to data partners. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "marketing_data_insights_service.retrieve_insights.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetrieveInsights", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "baseline", + "type": ".google.ads.datamanager.v1.Baseline" + }, + { + "name": "user_list_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.RetrieveInsightsResponse", + "client": { + "shortName": "MarketingDataInsightsServiceClient", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsServiceClient" + }, + "method": { + "shortName": "RetrieveInsights", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService.RetrieveInsights", + "service": { + "shortName": "MarketingDataInsightsService", + "fullName": "google.ads.datamanager.v1.MarketingDataInsightsService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_CreatePartnerLink_async", + "title": "IngestionService createPartnerLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.create_partner_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "partner_link", + "type": ".google.ads.datamanager.v1.PartnerLink" + } + ], + "resultType": ".google.ads.datamanager.v1.PartnerLink", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "CreatePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.CreatePartnerLink", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_DeletePartnerLink_async", + "title": "IngestionService deletePartnerLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a partner link for the given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.delete_partner_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "DeletePartnerLink", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.DeletePartnerLink", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_PartnerLinkService_SearchPartnerLinks_async", + "title": "IngestionService searchPartnerLinks Sample", + "origin": "API_DEFINITION", + "description": " Searches for all partner links to and from a given account. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "partner_link_service.search_partner_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchPartnerLinks", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", + "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" + } + ], + "resultType": ".google.ads.datamanager.v1.SearchPartnerLinksResponse", + "client": { + "shortName": "PartnerLinkServiceClient", + "fullName": "google.ads.datamanager.v1.PartnerLinkServiceClient" + }, + "method": { + "shortName": "SearchPartnerLinks", + "fullName": "google.ads.datamanager.v1.PartnerLinkService.SearchPartnerLinks", + "service": { + "shortName": "PartnerLinkService", + "fullName": "google.ads.datamanager.v1.PartnerLinkService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_CreateUserListDirectLicense_async", + "title": "IngestionService createUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Creates a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.create_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list_direct_license", + "type": ".google.ads.datamanager.v1.UserListDirectLicense" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "CreateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.CreateUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_GetUserListDirectLicense_async", + "title": "IngestionService getUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.get_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "GetUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.GetUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_UpdateUserListDirectLicense_async", + "title": "IngestionService updateUserListDirectLicense Sample", + "origin": "API_DEFINITION", + "description": " Updates a user list direct license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.update_user_list_direct_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", + "async": true, + "parameters": [ + { + "name": "user_list_direct_license", + "type": ".google.ads.datamanager.v1.UserListDirectLicense" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListDirectLicense", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "UpdateUserListDirectLicense", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.UpdateUserListDirectLicense", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListDirectLicenseService_ListUserListDirectLicenses_async", + "title": "IngestionService listUserListDirectLicenses Sample", + "origin": "API_DEFINITION", + "description": " Lists all user list direct licenses owned by the parent account. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_direct_license_service.list_user_list_direct_licenses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListDirectLicenses", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListDirectLicensesResponse", + "client": { + "shortName": "UserListDirectLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListDirectLicenses", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService.ListUserListDirectLicenses", + "service": { + "shortName": "UserListDirectLicenseService", + "fullName": "google.ads.datamanager.v1.UserListDirectLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_CreateUserListGlobalLicense_async", + "title": "IngestionService createUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Creates a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.create_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list_global_license", + "type": ".google.ads.datamanager.v1.UserListGlobalLicense" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "CreateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.CreateUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_UpdateUserListGlobalLicense_async", + "title": "IngestionService updateUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Updates a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.update_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "user_list_global_license", + "type": ".google.ads.datamanager.v1.UserListGlobalLicense" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "UpdateUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.UpdateUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_GetUserListGlobalLicense_async", + "title": "IngestionService getUserListGlobalLicense Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.get_user_list_global_license.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserListGlobalLicense", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "GetUserListGlobalLicense", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.GetUserListGlobalLicense", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenses_async", + "title": "IngestionService listUserListGlobalLicenses Sample", + "origin": "API_DEFINITION", + "description": " Lists all user list global licenses owned by the parent account. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.list_user_list_global_licenses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListGlobalLicenses", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicensesResponse", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListGlobalLicenses", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenses", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListGlobalLicenseService_ListUserListGlobalLicenseCustomerInfos_async", + "title": "IngestionService listUserListGlobalLicenseCustomerInfos Sample", + "origin": "API_DEFINITION", + "description": " Lists all customer info for a user list global license. This feature is only available to data partners.", + "canonical": true, + "file": "user_list_global_license_service.list_user_list_global_license_customer_infos.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 94, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserListGlobalLicenseCustomerInfos", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListGlobalLicenseCustomerInfosResponse", + "client": { + "shortName": "UserListGlobalLicenseServiceClient", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseServiceClient" + }, + "method": { + "shortName": "ListUserListGlobalLicenseCustomerInfos", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService.ListUserListGlobalLicenseCustomerInfos", + "service": { + "shortName": "UserListGlobalLicenseService", + "fullName": "google.ads.datamanager.v1.UserListGlobalLicenseService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_GetUserList_async", + "title": "IngestionService getUserList Sample", + "origin": "API_DEFINITION", + "description": " Gets a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.get_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserList", + "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "GetUserList", + "fullName": "google.ads.datamanager.v1.UserListService.GetUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_ListUserLists_async", + "title": "IngestionService listUserLists Sample", + "origin": "API_DEFINITION", + "description": " Lists UserLists. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.list_user_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserLists", + "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", + "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" + } + ], + "resultType": ".google.ads.datamanager.v1.ListUserListsResponse", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "ListUserLists", + "fullName": "google.ads.datamanager.v1.UserListService.ListUserLists", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_CreateUserList_async", + "title": "IngestionService createUserList Sample", + "origin": "API_DEFINITION", + "description": " Creates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.create_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_list", + "type": ".google.ads.datamanager.v1.UserList" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "CreateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.CreateUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_UpdateUserList_async", + "title": "IngestionService updateUserList Sample", + "origin": "API_DEFINITION", + "description": " Updates a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.update_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", + "async": true, + "parameters": [ + { + "name": "user_list", + "type": ".google.ads.datamanager.v1.UserList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.ads.datamanager.v1.UserList", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "UpdateUserList", + "fullName": "google.ads.datamanager.v1.UserListService.UpdateUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } + }, + { + "regionTag": "datamanager_v1_generated_UserListService_DeleteUserList_async", + "title": "IngestionService deleteUserList Sample", + "origin": "API_DEFINITION", + "description": " Deletes a UserList. Authorization Headers: This method supports the following optional headers to define how the API authorizes access for the request: * `login-account`: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * `linked-account`: (Optional) The resource name of the account with an established product link to the `login-account`. Format: `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`", + "canonical": true, + "file": "user_list_service.delete_user_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserList", + "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "UserListServiceClient", + "fullName": "google.ads.datamanager.v1.UserListServiceClient" + }, + "method": { + "shortName": "DeleteUserList", + "fullName": "google.ads.datamanager.v1.UserListService.DeleteUserList", + "service": { + "shortName": "UserListService", + "fullName": "google.ads.datamanager.v1.UserListService" + } + } + } } ] } diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.create_user_list_direct_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.get_user_list_direct_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.list_user_list_direct_licenses.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_direct_license_service.update_user_list_direct_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.create_user_list_global_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.get_user_list_global_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_license_customer_infos.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.list_user_list_global_licenses.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_global_license_service.update_user_list_global_license.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_service.create_user_list.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_service.delete_user_list.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_service.get_user_list.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_service.list_user_lists.js diff --git a/owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js b/packages/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js similarity index 100% rename from owl-bot-staging/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js rename to packages/google-ads-datamanager/samples/generated/v1/user_list_service.update_user_list.js diff --git a/packages/google-ads-datamanager/src/index.ts b/packages/google-ads-datamanager/src/index.ts index fa151fd1fe7..f2dc3b71128 100644 --- a/packages/google-ads-datamanager/src/index.ts +++ b/packages/google-ads-datamanager/src/index.ts @@ -20,8 +20,18 @@ import * as v1 from './v1'; const IngestionServiceClient = v1.IngestionServiceClient; type IngestionServiceClient = v1.IngestionServiceClient; +const MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; +type MarketingDataInsightsServiceClient = v1.MarketingDataInsightsServiceClient; +const PartnerLinkServiceClient = v1.PartnerLinkServiceClient; +type PartnerLinkServiceClient = v1.PartnerLinkServiceClient; +const UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; +type UserListDirectLicenseServiceClient = v1.UserListDirectLicenseServiceClient; +const UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; +type UserListGlobalLicenseServiceClient = v1.UserListGlobalLicenseServiceClient; +const UserListServiceClient = v1.UserListServiceClient; +type UserListServiceClient = v1.UserListServiceClient; -export {v1, IngestionServiceClient}; -export default {v1, IngestionServiceClient}; +export {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; +export default {v1, IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient}; 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 index 534830bfeb4..97528f86755 100644 --- a/packages/google-ads-datamanager/src/v1/gapic_metadata.json +++ b/packages/google-ads-datamanager/src/v1/gapic_metadata.json @@ -58,6 +58,276 @@ } } } + }, + "MarketingDataInsightsService": { + "clients": { + "grpc": { + "libraryClient": "MarketingDataInsightsServiceClient", + "rpcs": { + "RetrieveInsights": { + "methods": [ + "retrieveInsights" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MarketingDataInsightsServiceClient", + "rpcs": { + "RetrieveInsights": { + "methods": [ + "retrieveInsights" + ] + } + } + } + } + }, + "PartnerLinkService": { + "clients": { + "grpc": { + "libraryClient": "PartnerLinkServiceClient", + "rpcs": { + "CreatePartnerLink": { + "methods": [ + "createPartnerLink" + ] + }, + "DeletePartnerLink": { + "methods": [ + "deletePartnerLink" + ] + }, + "SearchPartnerLinks": { + "methods": [ + "searchPartnerLinks", + "searchPartnerLinksStream", + "searchPartnerLinksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PartnerLinkServiceClient", + "rpcs": { + "CreatePartnerLink": { + "methods": [ + "createPartnerLink" + ] + }, + "DeletePartnerLink": { + "methods": [ + "deletePartnerLink" + ] + }, + "SearchPartnerLinks": { + "methods": [ + "searchPartnerLinks", + "searchPartnerLinksStream", + "searchPartnerLinksAsync" + ] + } + } + } + } + }, + "UserListDirectLicenseService": { + "clients": { + "grpc": { + "libraryClient": "UserListDirectLicenseServiceClient", + "rpcs": { + "CreateUserListDirectLicense": { + "methods": [ + "createUserListDirectLicense" + ] + }, + "GetUserListDirectLicense": { + "methods": [ + "getUserListDirectLicense" + ] + }, + "UpdateUserListDirectLicense": { + "methods": [ + "updateUserListDirectLicense" + ] + }, + "ListUserListDirectLicenses": { + "methods": [ + "listUserListDirectLicenses", + "listUserListDirectLicensesStream", + "listUserListDirectLicensesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListDirectLicenseServiceClient", + "rpcs": { + "CreateUserListDirectLicense": { + "methods": [ + "createUserListDirectLicense" + ] + }, + "GetUserListDirectLicense": { + "methods": [ + "getUserListDirectLicense" + ] + }, + "UpdateUserListDirectLicense": { + "methods": [ + "updateUserListDirectLicense" + ] + }, + "ListUserListDirectLicenses": { + "methods": [ + "listUserListDirectLicenses", + "listUserListDirectLicensesStream", + "listUserListDirectLicensesAsync" + ] + } + } + } + } + }, + "UserListGlobalLicenseService": { + "clients": { + "grpc": { + "libraryClient": "UserListGlobalLicenseServiceClient", + "rpcs": { + "CreateUserListGlobalLicense": { + "methods": [ + "createUserListGlobalLicense" + ] + }, + "UpdateUserListGlobalLicense": { + "methods": [ + "updateUserListGlobalLicense" + ] + }, + "GetUserListGlobalLicense": { + "methods": [ + "getUserListGlobalLicense" + ] + }, + "ListUserListGlobalLicenses": { + "methods": [ + "listUserListGlobalLicenses", + "listUserListGlobalLicensesStream", + "listUserListGlobalLicensesAsync" + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "methods": [ + "listUserListGlobalLicenseCustomerInfos", + "listUserListGlobalLicenseCustomerInfosStream", + "listUserListGlobalLicenseCustomerInfosAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListGlobalLicenseServiceClient", + "rpcs": { + "CreateUserListGlobalLicense": { + "methods": [ + "createUserListGlobalLicense" + ] + }, + "UpdateUserListGlobalLicense": { + "methods": [ + "updateUserListGlobalLicense" + ] + }, + "GetUserListGlobalLicense": { + "methods": [ + "getUserListGlobalLicense" + ] + }, + "ListUserListGlobalLicenses": { + "methods": [ + "listUserListGlobalLicenses", + "listUserListGlobalLicensesStream", + "listUserListGlobalLicensesAsync" + ] + }, + "ListUserListGlobalLicenseCustomerInfos": { + "methods": [ + "listUserListGlobalLicenseCustomerInfos", + "listUserListGlobalLicenseCustomerInfosStream", + "listUserListGlobalLicenseCustomerInfosAsync" + ] + } + } + } + } + }, + "UserListService": { + "clients": { + "grpc": { + "libraryClient": "UserListServiceClient", + "rpcs": { + "GetUserList": { + "methods": [ + "getUserList" + ] + }, + "CreateUserList": { + "methods": [ + "createUserList" + ] + }, + "UpdateUserList": { + "methods": [ + "updateUserList" + ] + }, + "DeleteUserList": { + "methods": [ + "deleteUserList" + ] + }, + "ListUserLists": { + "methods": [ + "listUserLists", + "listUserListsStream", + "listUserListsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UserListServiceClient", + "rpcs": { + "GetUserList": { + "methods": [ + "getUserList" + ] + }, + "CreateUserList": { + "methods": [ + "createUserList" + ] + }, + "UpdateUserList": { + "methods": [ + "updateUserList" + ] + }, + "DeleteUserList": { + "methods": [ + "deleteUserList" + ] + }, + "ListUserLists": { + "methods": [ + "listUserLists", + "listUserListsStream", + "listUserListsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-ads-datamanager/src/v1/index.ts b/packages/google-ads-datamanager/src/v1/index.ts index 7b4fc264b59..b7d57ada5bc 100644 --- a/packages/google-ads-datamanager/src/v1/index.ts +++ b/packages/google-ads-datamanager/src/v1/index.ts @@ -17,3 +17,8 @@ // ** All changes to this file may be overwritten. ** export {IngestionServiceClient} from './ingestion_service_client'; +export {MarketingDataInsightsServiceClient} from './marketing_data_insights_service_client'; +export {PartnerLinkServiceClient} from './partner_link_service_client'; +export {UserListDirectLicenseServiceClient} from './user_list_direct_license_service_client'; +export {UserListGlobalLicenseServiceClient} from './user_list_global_license_service_client'; +export {UserListServiceClient} from './user_list_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 index 54548f713a6..30ad66231cf 100644 --- a/packages/google-ads-datamanager/src/v1/ingestion_service_client.ts +++ b/packages/google-ads-datamanager/src/v1/ingestion_service_client.ts @@ -58,6 +58,7 @@ export class IngestionServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; ingestionServiceStub?: Promise<{[name: string]: Function}>; /** @@ -172,6 +173,27 @@ export class IngestionServiceClient { // 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 = { + partnerLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}' + ), + userListPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userLists/{user_list}' + ), + userListDirectLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListDirectLicenses/{user_list_direct_license}' + ), + userListGlobalLicensePathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}' + ), + userListGlobalLicenseCustomerInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accountTypes/{account_type}/accounts/{account}/userListGlobalLicenses/{user_list_global_license}/customerInfos/{license_customer_info}' + ), + }; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.ads.datamanager.v1.IngestionService', gapicConfig as gax.ClientConfig, @@ -745,6 +767,267 @@ export class IngestionServiceClient { }); } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified partnerLink resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} partner_link + * @returns {string} Resource name string. + */ + partnerLinkPath(accountType:string,account:string,partnerLink:string) { + return this.pathTemplates.partnerLinkPathTemplate.render({ + account_type: accountType, + account: account, + partner_link: partnerLink, + }); + } + + /** + * Parse the account_type from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account_type; + } + + /** + * Parse the account from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the account. + */ + matchAccountFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).account; + } + + /** + * Parse the partner_link from PartnerLink resource. + * + * @param {string} partnerLinkName + * A fully-qualified path representing PartnerLink resource. + * @returns {string} A string representing the partner_link. + */ + matchPartnerLinkFromPartnerLinkName(partnerLinkName: string) { + return this.pathTemplates.partnerLinkPathTemplate.match(partnerLinkName).partner_link; + } + + /** + * Return a fully-qualified userList resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list + * @returns {string} Resource name string. + */ + userListPath(accountType:string,account:string,userList:string) { + return this.pathTemplates.userListPathTemplate.render({ + account_type: accountType, + account: account, + user_list: userList, + }); + } + + /** + * Parse the account_type from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account_type; + } + + /** + * Parse the account from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).account; + } + + /** + * Parse the user_list from UserList resource. + * + * @param {string} userListName + * A fully-qualified path representing UserList resource. + * @returns {string} A string representing the user_list. + */ + matchUserListFromUserListName(userListName: string) { + return this.pathTemplates.userListPathTemplate.match(userListName).user_list; + } + + /** + * Return a fully-qualified userListDirectLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_direct_license + * @returns {string} Resource name string. + */ + userListDirectLicensePath(accountType:string,account:string,userListDirectLicense:string) { + return this.pathTemplates.userListDirectLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_direct_license: userListDirectLicense, + }); + } + + /** + * Parse the account_type from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account_type; + } + + /** + * Parse the account from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).account; + } + + /** + * Parse the user_list_direct_license from UserListDirectLicense resource. + * + * @param {string} userListDirectLicenseName + * A fully-qualified path representing UserListDirectLicense resource. + * @returns {string} A string representing the user_list_direct_license. + */ + matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string) { + return this.pathTemplates.userListDirectLicensePathTemplate.match(userListDirectLicenseName).user_list_direct_license; + } + + /** + * Return a fully-qualified userListGlobalLicense resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @returns {string} Resource name string. + */ + userListGlobalLicensePath(accountType:string,account:string,userListGlobalLicense:string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + }); + } + + /** + * Parse the account_type from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account_type; + } + + /** + * Parse the account from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicense resource. + * + * @param {string} userListGlobalLicenseName + * A fully-qualified path representing UserListGlobalLicense resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string) { + return this.pathTemplates.userListGlobalLicensePathTemplate.match(userListGlobalLicenseName).user_list_global_license; + } + + /** + * Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string. + * + * @param {string} account_type + * @param {string} account + * @param {string} user_list_global_license + * @param {string} license_customer_info + * @returns {string} Resource name string. + */ + userListGlobalLicenseCustomerInfoPath(accountType:string,account:string,userListGlobalLicense:string,licenseCustomerInfo:string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render({ + account_type: accountType, + account: account, + user_list_global_license: userListGlobalLicense, + license_customer_info: licenseCustomerInfo, + }); + } + + /** + * Parse the account_type from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account_type. + */ + matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account_type; + } + + /** + * Parse the account from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).account; + } + + /** + * Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the user_list_global_license. + */ + matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).user_list_global_license; + } + + /** + * Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource. + * + * @param {string} userListGlobalLicenseCustomerInfoName + * A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource. + * @returns {string} A string representing the license_customer_info. + */ + matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string) { + return this.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match(userListGlobalLicenseCustomerInfoName).license_customer_info; + } /** * Terminate the gRPC channel and close the client. 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 index fe9dcc928fc..ec5cc61b87e 100644 --- a/packages/google-ads-datamanager/src/v1/ingestion_service_proto_list.json +++ b/packages/google-ads-datamanager/src/v1/ingestion_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/ads/datamanager/v1/age_range.proto", "../../protos/google/ads/datamanager/v1/audience.proto", "../../protos/google/ads/datamanager/v1/cart_data.proto", "../../protos/google/ads/datamanager/v1/consent.proto", @@ -8,12 +9,26 @@ "../../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/gender.proto", "../../protos/google/ads/datamanager/v1/ingestion_service.proto", + "../../protos/google/ads/datamanager/v1/insights_service.proto", "../../protos/google/ads/datamanager/v1/item_parameter.proto", "../../protos/google/ads/datamanager/v1/match_rate.proto", + "../../protos/google/ads/datamanager/v1/partner_link_service.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_list.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_direct_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_service.proto", + "../../protos/google/ads/datamanager/v1/user_list_global_license_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_client_account_type.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_metrics.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_pricing.proto", + "../../protos/google/ads/datamanager/v1/user_list_license_status.proto", + "../../protos/google/ads/datamanager/v1/user_list_service.proto", "../../protos/google/ads/datamanager/v1/user_properties.proto" ] diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts b/packages/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts rename to packages/google-ads-datamanager/src/v1/marketing_data_insights_service_client.ts diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json b/packages/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json rename to packages/google-ads-datamanager/src/v1/marketing_data_insights_service_client_config.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json b/packages/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json rename to packages/google-ads-datamanager/src/v1/marketing_data_insights_service_proto_list.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts b/packages/google-ads-datamanager/src/v1/partner_link_service_client.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client.ts rename to packages/google-ads-datamanager/src/v1/partner_link_service_client.ts diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json b/packages/google-ads-datamanager/src/v1/partner_link_service_client_config.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_client_config.json rename to packages/google-ads-datamanager/src/v1/partner_link_service_client_config.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json b/packages/google-ads-datamanager/src/v1/partner_link_service_proto_list.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/partner_link_service_proto_list.json rename to packages/google-ads-datamanager/src/v1/partner_link_service_proto_list.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts b/packages/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts rename to packages/google-ads-datamanager/src/v1/user_list_direct_license_service_client.ts diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json b/packages/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json rename to packages/google-ads-datamanager/src/v1/user_list_direct_license_service_client_config.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json b/packages/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json rename to packages/google-ads-datamanager/src/v1/user_list_direct_license_service_proto_list.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts b/packages/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts rename to packages/google-ads-datamanager/src/v1/user_list_global_license_service_client.ts diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json b/packages/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json rename to packages/google-ads-datamanager/src/v1/user_list_global_license_service_client_config.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json b/packages/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json rename to packages/google-ads-datamanager/src/v1/user_list_global_license_service_proto_list.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts b/packages/google-ads-datamanager/src/v1/user_list_service_client.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client.ts rename to packages/google-ads-datamanager/src/v1/user_list_service_client.ts diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json b/packages/google-ads-datamanager/src/v1/user_list_service_client_config.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_client_config.json rename to packages/google-ads-datamanager/src/v1/user_list_service_client_config.json diff --git a/owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json b/packages/google-ads-datamanager/src/v1/user_list_service_proto_list.json similarity index 100% rename from owl-bot-staging/google-ads-datamanager/src/v1/user_list_service_proto_list.json rename to packages/google-ads-datamanager/src/v1/user_list_service_proto_list.json 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 index 09b725fb367..da1c9a355b4 100644 --- a/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.js +++ b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.js @@ -22,6 +22,11 @@ const datamanager = require('@google-ads/datamanager'); function main() { const ingestionServiceClient = new datamanager.IngestionServiceClient(); + const marketingDataInsightsServiceClient = new datamanager.MarketingDataInsightsServiceClient(); + const partnerLinkServiceClient = new datamanager.PartnerLinkServiceClient(); + const userListDirectLicenseServiceClient = new datamanager.UserListDirectLicenseServiceClient(); + const userListGlobalLicenseServiceClient = new datamanager.UserListGlobalLicenseServiceClient(); + const userListServiceClient = new datamanager.UserListServiceClient(); } 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 index d12f8482e11..2e2810220ae 100644 --- a/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.ts +++ b/packages/google-ads-datamanager/system-test/fixtures/sample/src/index.ts @@ -16,17 +16,47 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {IngestionServiceClient} from '@google-ads/datamanager'; +import {IngestionServiceClient, MarketingDataInsightsServiceClient, PartnerLinkServiceClient, UserListDirectLicenseServiceClient, UserListGlobalLicenseServiceClient, UserListServiceClient} from '@google-ads/datamanager'; // check that the client class type name can be used function doStuffWithIngestionServiceClient(client: IngestionServiceClient) { client.close(); } +function doStuffWithMarketingDataInsightsServiceClient(client: MarketingDataInsightsServiceClient) { + client.close(); +} +function doStuffWithPartnerLinkServiceClient(client: PartnerLinkServiceClient) { + client.close(); +} +function doStuffWithUserListDirectLicenseServiceClient(client: UserListDirectLicenseServiceClient) { + client.close(); +} +function doStuffWithUserListGlobalLicenseServiceClient(client: UserListGlobalLicenseServiceClient) { + client.close(); +} +function doStuffWithUserListServiceClient(client: UserListServiceClient) { + client.close(); +} function main() { // check that the client instance can be created const ingestionServiceClient = new IngestionServiceClient(); doStuffWithIngestionServiceClient(ingestionServiceClient); + // check that the client instance can be created + const marketingDataInsightsServiceClient = new MarketingDataInsightsServiceClient(); + doStuffWithMarketingDataInsightsServiceClient(marketingDataInsightsServiceClient); + // check that the client instance can be created + const partnerLinkServiceClient = new PartnerLinkServiceClient(); + doStuffWithPartnerLinkServiceClient(partnerLinkServiceClient); + // check that the client instance can be created + const userListDirectLicenseServiceClient = new UserListDirectLicenseServiceClient(); + doStuffWithUserListDirectLicenseServiceClient(userListDirectLicenseServiceClient); + // check that the client instance can be created + const userListGlobalLicenseServiceClient = new UserListGlobalLicenseServiceClient(); + doStuffWithUserListGlobalLicenseServiceClient(userListGlobalLicenseServiceClient); + // check that the client instance can be created + const userListServiceClient = new UserListServiceClient(); + doStuffWithUserListServiceClient(userListServiceClient); } main(); diff --git a/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts b/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts index 5cb6dc166e8..ab31bea65b7 100644 --- a/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts +++ b/packages/google-ads-datamanager/test/gapic_ingestion_service_v1.ts @@ -511,4 +511,245 @@ describe('v1.IngestionServiceClient', () => { await assert.rejects(client.retrieveRequestStatus(request), expectedError); }); }); + + describe('Path templates', () => { + + describe('partnerLink', async () => { + const fakePath = "/rendered/path/partnerLink"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + partner_link: "partnerLinkValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.partnerLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partnerLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partnerLinkPath', () => { + const result = client.partnerLinkPath("accountTypeValue", "accountValue", "partnerLinkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partnerLinkPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromPartnerLinkName', () => { + const result = client.matchAccountTypeFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromPartnerLinkName', () => { + const result = client.matchAccountFromPartnerLinkName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartnerLinkFromPartnerLinkName', () => { + const result = client.matchPartnerLinkFromPartnerLinkName(fakePath); + assert.strictEqual(result, "partnerLinkValue"); + assert((client.pathTemplates.partnerLinkPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userList', async () => { + const fakePath = "/rendered/path/userList"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list: "userListValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListPath', () => { + const result = client.userListPath("accountTypeValue", "accountValue", "userListValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListName', () => { + const result = client.matchAccountTypeFromUserListName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListName', () => { + const result = client.matchAccountFromUserListName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListFromUserListName', () => { + const result = client.matchUserListFromUserListName(fakePath); + assert.strictEqual(result, "userListValue"); + assert((client.pathTemplates.userListPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListDirectLicense', async () => { + const fakePath = "/rendered/path/userListDirectLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_direct_license: "userListDirectLicenseValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListDirectLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListDirectLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListDirectLicensePath', () => { + const result = client.userListDirectLicensePath("accountTypeValue", "accountValue", "userListDirectLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListDirectLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListDirectLicenseName', () => { + const result = client.matchAccountTypeFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListDirectLicenseName', () => { + const result = client.matchAccountFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListDirectLicenseFromUserListDirectLicenseName', () => { + const result = client.matchUserListDirectLicenseFromUserListDirectLicenseName(fakePath); + assert.strictEqual(result, "userListDirectLicenseValue"); + assert((client.pathTemplates.userListDirectLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicense', async () => { + const fakePath = "/rendered/path/userListGlobalLicense"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicensePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicensePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicensePath', () => { + const result = client.userListGlobalLicensePath("accountTypeValue", "accountValue", "userListGlobalLicenseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseName', () => { + const result = client.matchAccountFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicensePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userListGlobalLicenseCustomerInfo', async () => { + const fakePath = "/rendered/path/userListGlobalLicenseCustomerInfo"; + const expectedParameters = { + account_type: "accountTypeValue", + account: "accountValue", + user_list_global_license: "userListGlobalLicenseValue", + license_customer_info: "licenseCustomerInfoValue", + }; + const client = new ingestionserviceModule.v1.IngestionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userListGlobalLicenseCustomerInfoPath', () => { + const result = client.userListGlobalLicenseCustomerInfoPath("accountTypeValue", "accountValue", "userListGlobalLicenseValue", "licenseCustomerInfoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchAccountTypeFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountTypeValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAccountFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchAccountFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "accountValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "userListGlobalLicenseValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName', () => { + const result = client.matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(fakePath); + assert.strictEqual(result, "licenseCustomerInfoValue"); + assert((client.pathTemplates.userListGlobalLicenseCustomerInfoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); }); diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts b/packages/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts rename to packages/google-ads-datamanager/test/gapic_marketing_data_insights_service_v1.ts diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts b/packages/google-ads-datamanager/test/gapic_partner_link_service_v1.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/test/gapic_partner_link_service_v1.ts rename to packages/google-ads-datamanager/test/gapic_partner_link_service_v1.ts diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts b/packages/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts rename to packages/google-ads-datamanager/test/gapic_user_list_direct_license_service_v1.ts diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts b/packages/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts rename to packages/google-ads-datamanager/test/gapic_user_list_global_license_service_v1.ts diff --git a/owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts b/packages/google-ads-datamanager/test/gapic_user_list_service_v1.ts similarity index 100% rename from owl-bot-staging/google-ads-datamanager/test/gapic_user_list_service_v1.ts rename to packages/google-ads-datamanager/test/gapic_user_list_service_v1.ts